Skip to content
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

Break nested TSConditionalType #5272

Merged
merged 1 commit into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/language-js/printer-estree.js
Original file line number Diff line number Diff line change
Expand Up @@ -3277,7 +3277,7 @@ function printPathNoParens(path, options, print, args) {
consequentNodePropertyName: "trueType",
alternateNodePropertyName: "falseType",
testNodePropertyName: "checkType",
breakNested: false
breakNested: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR this is true in both calls of this function now

});

case "TSInferType":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ type TypeName<T> =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export type DeepReadonly<T> = T extends any[]
? DeepReadonlyArray<T[number]>
: T extends object ? DeepReadonlyObject<T> : T;
: T extends object
? DeepReadonlyObject<T>
: T;

type NonFunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends Function ? never : K
Expand All @@ -41,7 +43,9 @@ type TypeName<T> = T extends string
? "boolean"
: T extends undefined
? "undefined"
: T extends Function ? "function" : "object";
: T extends Function
? "function"
: "object";

`;

Expand Down