How to Union in scope()?
Union 1 will be resolved as I would expect to
But Union 2
will be resolved to
although I would expect something like
If I'm trying to do the same with the base union syntax that I found
I get a type error
https://stackblitz.com/edit/rzkceh-eodur9?file=demo.ts
ts?: string | TimeStub | undefined;:But Union 2
will be resolved to
although I would expect something like
user: User | TimeStubIf I'm trying to do the same with the base union syntax that I found
"ts?": "string|['instanceof', TimeStub] as Infer<TimeStub>"I get a type error
https://stackblitz.com/edit/rzkceh-eodur9?file=demo.ts