-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add %checks and T is x #51
base: master
Are you sure you want to change the base?
Conversation
Hi @Bjeaurn. This feature is not unique to Flow, as TypeScript has an equivalent (and even more advanced/useful): I'd happily accept a description/comparison of both features into the readme. |
This kind of comments make this project lose all its credibility, just FYI |
Is the comment inaccurate? If so, you could elaborate |
They do the same thing |
They don't do the same thing @FezVrasta. You can't use Below is one really useful example taken from the TypeScript's library definition ( interface Array<T> {
filter<S extends T>(callbackfn: (value: T, index: number) => value is S): S[];
} This makes is possible refine the type of an Array by filtering it. You can't model this with Additionally, I apologize for not being clear in my first comment, but my intention is completeness, not bias against any of the two technologies. |
How can you say the The Flow definition seems way more accurate, since it allows to return |
That's not the meaning of The difference is in the fact that such defined Here's an example comparing the two in respective playgrounds: TypeScript vs Flow All in all,
The two reasons above make TypeScript's |
No description provided.