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.
-
-
At least ability to define getter indexer type (T | undefined) separately from setter indexer type (T). But JS Arrays are hard, so many features packed into them, so flexible, type systems cannot express.
-
Indeed! It's hard to type something which is so dynamic. In a new codebase we use the NonEmptyArray or Array types from fp-ts. If you access a value from Array there you get back an Option type. Makes code so much nicer!
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 