-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Flow call expression generic with union type is parsed incorrectly with babylon parser #5460
Comments
This looks like an edge case in babylon. As a workaround you could use Prettier 1.15.2 --parser flow Input: const Theme = React.createContext<"light" | "dark">("light"); Output: const Theme = React.createContext<"light" | "dark">("light"); |
You can also use |
This comment has been minimized.
This comment has been minimized.
Since babel/babel#7934, the |
Should Prettier add an option to enable |
How about adding a |
Prettier 1.15.2
Playground link
Input:
Output:
Expected behavior:
This seems pretty bad.
The text was updated successfully, but these errors were encountered: