-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Miss aligned union type in property signature #18106
Copy link
Copy link
Labels
area:union typeslang: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.
Milestone
Description
Prettier 3.6.2
Playground link
--parser typescriptInput:
export interface DirectiveArgumentNode extends ArrayExpression {
elements: // dir, exp, arg, modifiers
| [string]
| [string, ExpressionNode]
| [string, ExpressionNode, ExpressionNode]
| [string, ExpressionNode, ExpressionNode, ObjectExpression]
}Output:
export interface DirectiveArgumentNode extends ArrayExpression {
elements: // dir, exp, arg, modifiers
| [string]
| [string, ExpressionNode]
| [string, ExpressionNode, ExpressionNode]
| [string, ExpressionNode, ExpressionNode, ObjectExpression];
}Expected output:
export interface DirectiveArgumentNode extends ArrayExpression {
elements: // dir, exp, arg, modifiers
| [string]
| [string, ExpressionNode]
| [string, ExpressionNode, ExpressionNode]
| [string, ExpressionNode, ExpressionNode, ObjectExpression];
}Why?
The expected output is Prettier.
Context: oxc-project/oxc#14669 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:union typeslang: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.