that’s the type I added to the flow-core lib. Again, not saying this is some big reason for preferring Flow. just many small things
-
-
After the non-nullable types and flow analysis. Typescript is pretty good. Just not quite Flow level yet.
2 replies 0 retweets 0 likes -
Replying to @wycats
hey. Got all the respect for you in the world. You probably know way more about type systems than I can imagine.
1 reply 0 retweets 0 likes -
Replying to @naman34
I'm very interested in the concrete thing you're trying to express. I'll be the first to admit deficiencies in TS.
1 reply 0 retweets 0 likes -
Replying to @wycats
maybe it's a little academic. All I'm trying to express is an overloaded type for the Array filter method.
1 reply 0 retweets 0 likes -
so while normally .filter will return the same array type as the input. If the function is the Boolean class it removes the nulla
2 replies 0 retweets 0 likes -
Replying to @naman34
here's what I would do in TS:pic.twitter.com/pwymUG3BZb
2 replies 0 retweets 1 like -
Replying to @wycats
looks good. But I think the second filter should return Option<T>[]
1 reply 0 retweets 0 likes -
btw I'm using the annotations to indicate what inference would have picked.
-
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.