That's intentional, TS types are erased in runtime. My go-to way for this is discriminated unions: https://www.typescriptlang.org/docs/handbook/unions-and-inte...
That's intentional, TS types are erased in runtime. My go-to way for this is discriminated unions: https://www.typescriptlang.org/docs/handbook/unions-and-inte...