-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Open
Copy link
Labels
area:intersection typesarea: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)status:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken
Description
Prettier 1.10.2
Playground link
--parser typescriptInput:
type IntesectionType = VeryLongTypeA & VeryLongTypeB & VeryLongTypeC & VeryLongTypeD & VeryLongTypeE
type UnionType = VeryLongTypeA | VeryLongTypeB | VeryLongTypeC | VeryLongTypeD | VeryLongTypeEOutput:
type IntesectionType = VeryLongTypeA &
VeryLongTypeB &
VeryLongTypeC &
VeryLongTypeD &
VeryLongTypeE;
type UnionType =
| VeryLongTypeA
| VeryLongTypeB
| VeryLongTypeC
| VeryLongTypeD
| VeryLongTypeE;Expected behavior:
type IntesectionType =
& VeryLongTypeA
& VeryLongTypeB
& VeryLongTypeC
& VeryLongTypeD
& VeryLongTypeE;
type UnionType =
| VeryLongTypeA
| VeryLongTypeB
| VeryLongTypeC
| VeryLongTypeD
| VeryLongTypeE;I think the Interections type should use the same format as the one used for the Union type.
adjerbetian, tddyco, miyaokamarina, reyronald, vlaja and 38 more
Metadata
Metadata
Assignees
Labels
area:intersection typesarea: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)status:needs discussionIssues needing discussion and a decision to be made before action can be takenIssues needing discussion and a decision to be made before action can be taken