mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Automatic semicolon insertion before 'extends' in conditional type
This commit is contained in:
1 parent
d584f4d97b
commit
0d3f2166e3
1 file changed
+1
-1
@@ -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 = <ConditionalTypeNode>createNode(SyntaxKind.ConditionalType, type.pos);
|
||||
node.checkType = type;
|
||||
// The type following 'extends' is not permitted to be another conditional type
|
||||
|
||||
Reference in new issue
Block a user