-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conditional types in generic constraints look confusing #10732
Copy link
Copy link
Labels
difficulty:easyIssues that should be easy to fix. Resolve me on the train to work!Issues that should be easy to fix. Resolve me on the train to work!good first issueGood fist issue!Good fist issue!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Metadata
Metadata
Assignees
Labels
difficulty:easyIssues that should be easy to fix. Resolve me on the train to work!Issues that should be easy to fix. Resolve me on the train to work!good first issueGood fist issue!Good fist issue!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Prettier 2.2.1
Playground link
Input:
Output:
Expected behavior:
At least keep the parentheses around
NodeOrToken extends TSESTree.Node ? AST_NODE_TYPES : AST_TOKEN_TYPESOriginally posted by @MichaelDeBoey in #7940 (comment)