diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 5b8504eb6dc..3209f234f85 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2986,7 +2986,7 @@ namespace ts { return parseFunctionOrConstructorType(SyntaxKind.ConstructorType); } const type = parseUnionTypeOrHigher(); - if (!noConditionalTypes && parseOptional(SyntaxKind.ExtendsKeyword)) { + if (!noConditionalTypes && !scanner.hasPrecedingLineBreak() && parseOptional(SyntaxKind.ExtendsKeyword)) { const node = createNode(SyntaxKind.ConditionalType, type.pos); node.checkType = type; // The type following 'extends' is not permitted to be another conditional type