File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,8 @@ export type EventId<Name extends string = string> = string & {
2020 __name : Name ;
2121} ;
2222export type VEventId < Name extends string > = VString < EventId < Name > > ;
23- export const vEventId = v . string ( ) as VString < EventId < string > > ;
24-
25- export type EventSpec < Name extends string = string , T = unknown > = (
26- | { name : Name ; id ?: EventId < Name > }
27- | { name ?: Name ; id : EventId < Name > }
28- ) & {
29- validator ?: Validator < T , any , any > ;
30- } ;
23+ export const vEventId = < Name extends string = string > ( _name ?: Name ) =>
24+ v . string ( ) as VString < EventId < Name > > ;
3125
3226export type WorkflowStep = {
3327 workflowId : WorkflowId ;
@@ -65,7 +59,7 @@ export const vWorkflowStep = v.object({
6559 ) ,
6660 workId : v . optional ( vWorkIdValidator ) ,
6761 nestedWorkflowId : v . optional ( vWorkflowId ) ,
68- eventId : v . optional ( vEventId ) ,
62+ eventId : v . optional ( vEventId ( ) ) ,
6963} ) ;
7064// type assertion to keep us in check
7165const _ : Infer < typeof vWorkflowStep > = { } as WorkflowStep ;
You can’t perform that action at this time.
0 commit comments