Type predicates are just an annotation and aren't actually checked. Meaning you can do some pretty wacky and unsafe things. Is there an technical constraint preventing TS from checking these?pic.twitter.com/qtIIzM1Cat
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Type predicates are just an annotation and aren't actually checked. Meaning you can do some pretty wacky and unsafe things. Is there an technical constraint preventing TS from checking these?pic.twitter.com/qtIIzM1Cat
As expressions are another one. The safety guarantees are minuscule. I find the overlapping semantics to be confusing and not actually useful.pic.twitter.com/SqqnJxRz5H
Refining 'unknown' to an array produces 'Array<any>' where as 'Array<unknown>` would make more sense. Not sure if it does in other places too.pic.twitter.com/gsRa67JFFk
/terrified/ bud? I think we’re being a bit dramatic
Your third example is a reasonable concern imo. The other two... not so much.
I hate TS. But it’s the hype so let’s use it :)
What is our next best option? Flow? I’m legitimately wondering.
Typescript is an unsound type checker. I thought that was already the consensus but opening an issue is almost always helpful to the team.
Here’s a really fun one: function isFeatureXEnabled(): boolean {...} const result = if (isFeatureXEnabled) {...} The underlying semantics of JavaScript naturally make for unsafety everything, not much either TS or Flow can do about that. For safe semantics we need a diff language
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.