Skip to content

Commit a64fa26

Browse files
committed
improve opaqueids
1 parent a4b293d commit a64fa26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/client/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ export type UseApi<API> = Expand<{
132132
export type OpaqueIds<T> =
133133
T extends GenericId<infer _T>
134134
? string
135-
: T extends WorkId | WorkflowId | EventId<any>
136-
? string
135+
: T extends string
136+
? `${T}` extends T
137+
? T
138+
: string
137139
: T extends (infer U)[]
138140
? OpaqueIds<U>[]
139141
: T extends object

0 commit comments

Comments
 (0)