If I'm trying to do the same with the base union syntax that I found
"ts?": "string|['instanceof', TimeStub] as Infer<TimeStub>"
"ts?": "string|['instanceof', TimeStub] as Infer<TimeStub>"
I get a type error
Type '"string|['instanceof', TimeStub] as Infer<TimeStub>"' is not assignable to type '"string|string" | "string|number" | "string|bigint" | "string|boolean" | "string|symbol" | "string|undefined" | "string|object" | "string|null" | "string|Date" | "string|Error" | ... 25 more ... | "string|parsedDate"'.(2322)demo.ts(44, 5): The expected type comes from property 'ts?' which is declared here on type '{ "id?": "string"; "coll?": "string"; "ts?": "string|string" | "string|number" | "string|bigint" | "string|boolean" | "string|symbol" | "string|undefined" | "string|object" | "string|null" | ... 27 more ... | "string|parsedDate"; }'
Type '"string|['instanceof', TimeStub] as Infer<TimeStub>"' is not assignable to type '"string|string" | "string|number" | "string|bigint" | "string|boolean" | "string|symbol" | "string|undefined" | "string|object" | "string|null" | "string|Date" | "string|Error" | ... 25 more ... | "string|parsedDate"'.(2322)demo.ts(44, 5): The expected type comes from property 'ts?' which is declared here on type '{ "id?": "string"; "coll?": "string"; "ts?": "string|string" | "string|number" | "string|bigint" | "string|boolean" | "string|symbol" | "string|undefined" | "string|object" | "string|null" | ... 27 more ... | "string|parsedDate"; }'