Re:Announcing TypeScript 2.1
by seattle_spring on Wednesday December 07, 2016 @12:55PM
(#13124521)
Seems like all of the new features have been available in Flow for quite a while now.
[ Parent
| on HN ]
The new type system features are: keyof, lookup types, and mapped types. Does flow have even one of these?
Re:Announcing TypeScript 2.1
by seattle_spring on Wednesday December 07, 2016 @01:13PM
(#13124705)
$Keys<> for keyof, $MapObj<> for mapped types. They are sorely missing lookup types though.
Googling for mapobj doesn't give me any results. Can you point to some documentation on these?
I can't seem to find any info online about $MapObj<>? I searched the docs, google ... nuthin'. Am I just missing something?
Re:Announcing TypeScript 2.1
by seattle_spring on Wednesday December 07, 2016 @06:56PM
(#13127329)
Apologies, it's $ObjMap. And it's unfortunately not in the documentation, which could admittedly be improved.
Typescript seems to get a lot more attention (at least on HN). How does Flow progress? How is the community around it? I'm curious to know more as an external to both projects.
Flow is not a language
https://flowtype.org/
function bar(x): string {
That's not JavaScript.
Re:Announcing TypeScript 2.1
by thejameskyle on Wednesday December 07, 2016 @02:51PM
(#13125618)
If that's too much you can also do:
function bar(x) /* : string */ {
No compiling necessary