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)
-
-
-
$shape<obj> gives you an object with all the keys made optional. (Used for setState in React)1 reply 0 retweets 2 likes -
$Diff<obj1, obj2> makes all the keys is obj2 optional. Used to calculate requirements by doing Props - DefaultProps in React.1 reply 0 retweets 2 likes -
Replying to @naman34
Flow seems to have many features crafted for React features ;)
1 reply 0 retweets 1 like -
Replying to @wycats
Not sure if they were added FOR react or they just use the features in the react types.
2 replies 0 retweets 0 likes -
I just happened to learn a ton by going through the type definitions for React in the Flow repo.
1 reply 0 retweets 0 likes -
Replying to @naman34
fwiw Ember has the same .get issue, and this is an elegant solution. I'll ask the TS folks if it's particularly hard.
2 replies 0 retweets 1 like
TLDR Keys<AnyInterface> => 'key1' | 'key2' | 'key3' ...
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.