We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d584f4d commit 0d3f216Copy full SHA for 0d3f216
src/compiler/parser.ts
@@ -2986,7 +2986,7 @@ namespace ts {
2986
return parseFunctionOrConstructorType(SyntaxKind.ConstructorType);
2987
}
2988
const type = parseUnionTypeOrHigher();
2989
- if (!noConditionalTypes && parseOptional(SyntaxKind.ExtendsKeyword)) {
+ if (!noConditionalTypes && !scanner.hasPrecedingLineBreak() && parseOptional(SyntaxKind.ExtendsKeyword)) {
2990
const node = <ConditionalTypeNode>createNode(SyntaxKind.ConditionalType, type.pos);
2991
node.checkType = type;
2992
// The type following 'extends' is not permitted to be another conditional type
0 commit comments