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 6a8f4cb commit 80963baCopy full SHA for 80963ba
src/compiler/checker.ts
@@ -1538,8 +1538,8 @@ namespace ts {
1538
1539
function createType(flags: TypeFlags): Type {
1540
const result = new Type(checker, flags);
1541
- result.id = typeCount;
1542
typeCount++;
+ result.id = typeCount;
1543
return result;
1544
}
1545
@@ -5235,11 +5235,7 @@ namespace ts {
5235
5236
5237
function createTupleType(elementTypes: Type[], thisType?: Type) {
5238
- let id = getTypeListId(elementTypes);
5239
- if (thisType) {
5240
- id += ',' + thisType.id;
5241
- }
5242
-
+ const id = getTypeListId(elementTypes) + ',' + (thisType ? thisType.id : 0);
5243
return tupleTypes[id] || (tupleTypes[id] = createNewTupleType(elementTypes, thisType));
5244
5245
0 commit comments