4 ms·
In TypeScript you can define your discriminated union with strings, they call it literal types: type Foo = "bar" | "baz" | "qux"
by scns 5y ago
In TypeScript you can define your discriminated union with strings, they call it literal types:
type Foo = "bar" | "baz" | "qux"