After using TypeScript there's some features that I'm terrified of that seem counter intuitive. All the following examples produce NO errors and are with every single strict TS option enabled.
-
-
The second two look fine but the isStatement can probably be achieved by using discriminated unions. If you have a switch like that, seems like you are using one property to determine the type of the object. https://www.typescriptlang.org/docs/handbook/advanced-types.html#discriminated-unions …
-
I left out all the other cases, there's about 50 other possible type properties that it can match.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 