-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support typeof x === "symbol"
#1015
Comments
Support for well-known symbols would be really handy. For example, if we understood |
It would be a welcome improvement for Flow to properly support |
I think there are two things, One is proper support for the primitive data type of symbol. 6: export type EventName = string | symbol;
^^^^^^ symbol. Could not resolve name Second is support for common symbols: |
This comment has been minimized.
This comment has been minimized.
Any update here? |
so when will this actually happen? |
:( |
@kevinSuttle the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just a side note: Importing pull request does not mean that it will be merged. AFAIK FB has their internal review tools that they use instead of github. If importing means something, it can be interpreted in a way that they are considering the proposed change. If you are more interested in that particular issue ( #7271 ), there is pretty interesting, even philosophical conversation about the topic: #7128 If you think that my opinion is the correct one, you can show support by thumbing it up :) If you are willing to contribute but don't now how to climb the OCaml mountain, this might help you forward: #4181 (comment) |
@villesau Well, yes. But at least being imported it will be considered. |
Merged. Will be in upcoming release. |
https://flow.org/en/docs/types/primitives/ |
agree with @a7madgamal, the doc seem has not been updated for a while! |
I noticed that while:
errors correctly, the following does not:
Is this difference in behavior intentional? |
not sure what flow's support for
Symbol
in general is, buttypeof x === "symbol"
is not currently supported so we should fix that and whatever else is necessary for that to work properly.The text was updated successfully, but these errors were encountered: