No JS tool (that I know of) will warn you about these conditions being impossible. But they should. const foo = 'FOO'; if (foo[0] === 'B') {} // impossible if (foo === 'BAR') {} // impossible
-
-
I need to be faster with my screenshots :(pic.twitter.com/krlTO0II4U
-
For what it's worth,
@WesleyWigham prototyped something that would've made the middle one work (indexing into something with a string literal type). He's also the one with the branch for regex literal types. :D
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 