maybe it's a little academic. All I'm trying to express is an overloaded type for the Array filter method.
-
-
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 -
-
Replying to @wycats
exactly the use-case I was going for! The next big project is to type immutable.js without losing any info.
2 replies 0 retweets 0 likes -
$keys gives flow a bit of an edge. But neither flow or TS can fully type immutable.js right now. Another day!1 reply 0 retweets 0 likes -
Replying to @naman34
which aspect of immutable.js is un-typeable? (I've had fun times trying to type parts of Ember, so I know a few tricks :P)
2 replies 0 retweets 1 like -
2. The values retired from .get keeping their type information. Currently impossible.
1 reply 0 retweets 0 likes
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.