mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Fix exceptions on empty tuple errors (#17311)
* Fix exceptions on empty tuple errors * Remove bonus semicolon * Invert condition
This commit is contained in:
1 parent
1f09af9ab6
commit
7cb8ce4346
7 files changed
+55
-2
No files matched your search
@@ -2621,9 +2621,10 @@ namespace ts {
|
||||
return createTupleTypeNode(tupleConstituentNodes);
|
||||
}
|
||||
}
|
||||
if (!context.encounteredError && !(context.flags & NodeBuilderFlags.AllowEmptyTuple)) {
|
||||
context.encounteredError = true;
|
||||
if (context.encounteredError || (context.flags & NodeBuilderFlags.AllowEmptyTuple)) {
|
||||
return createTupleTypeNode([]);
|
||||
}
|
||||
context.encounteredError = true;
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user