niieani / typescript-vs-flowtype

Differences between Flowtype and TypeScript -- syntax and usability
MIT License
1.73k stars 78 forks source link

Not up-to date comparison #42

Closed kirilloid closed 6 years ago

kirilloid commented 6 years ago

Obviously, it's hard to keep staying on the bleeding edge, so it's understandable the table doesn't contain most up-to-date features. Thanks for you work anyway. I think there's a a low-hanging fruit to help improving the situation, though.

Proposal: add latest versions compared (would be great to add date, month/year is enough). Unfortunately, I'd not offer help with a PR here, because people who wrote existing things, know that better.

niieani commented 6 years ago

Hi @kirilloid.

I try to keep the repo updated. There is a disclaimer regarding which versions the repo is comparing, which I also update based on changelogs of both Flow and TS:

This document might be incomplete and/or contain mistakes and was last updated to describe TypeScript 3.0 and Flow 0.80.

What specific things do you find not up-to-date? Please open issues o PRs regarding those. I know we are missing some things, but generally I think what is there, is generally up-to-date.

kirilloid commented 6 years ago

Ok, basically why I thought so.

testing potential code-paths when types not declared for maximum inference

I'm not sure what does that mean, but TypeScript has some control-flow type analysis.

$Diff<A, B> type

I though it's available in TypeScript, but I mixed it up. TypeScript does have Exclude and Extract, but they work for type unions: A | B, not intersections A & B.

BTW am I right that it's row-type polymorphism?

error quality

I have heard they significantly improved error messages in flow. I almost haven't worked with flow (but worked with TS a lot) and examples from this article seems like pretty good error messages.

OK, I think we can close the issue.

NN--- commented 6 years ago

TypeScript 3.1 adds more nice type features.

niieani commented 6 years ago

I am aware @NN---, but I'd prefer to keep issues / PRs per specific missing feature, cause it's hard to keep track of what is missing with an umbrella/unspecific issue like this. Closing as per @kirilloid's mention.