top | item 32917800

(no title)

rideg | 3 years ago

You can use type guards for something similar: https://www.typescriptlang.org/docs/handbook/advanced-types....

discuss

order

brundolf|3 years ago

What they were getting at is that you can't observe T itself, only values passed in as type T

323|3 years ago

Keyword similar. I use type guards for other things (like typing JSON responses), but they can't solve this particular problem.