Skip to content

Commit ea55de3

Browse files
committed
Eagerly fall back to TupleBase
1 parent c2374c4 commit ea55de3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4993,7 +4993,7 @@ namespace ts {
49934993
function getBaseTypes(type: InterfaceType): BaseType[] {
49944994
if (!type.resolvedBaseTypes) {
49954995
if (type.objectFlags & ObjectFlags.Tuple) {
4996-
type.resolvedBaseTypes = [createTypeFromGenericGlobalType(globalTupleBaseType || globalArrayType, [getUnionType(type.typeParameters)])];
4996+
type.resolvedBaseTypes = [createTypeFromGenericGlobalType(globalTupleBaseType, [getUnionType(type.typeParameters)])];
49974997
}
49984998
else if (type.symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
49994999
if (type.symbol.flags & SymbolFlags.Class) {
@@ -24526,7 +24526,7 @@ namespace ts {
2452624526

2452724527
// TODO: ReadonlyArray and TupleBase should always be available, but haven't been required previously
2452824528
globalReadonlyArrayType = <GenericType>getGlobalTypeOrUndefined("ReadonlyArray" as __String, /*arity*/ 1);
24529-
globalTupleBaseType = <GenericType>getGlobalTypeOrUndefined("TupleBase" as __String, /*arity*/ 1);
24529+
globalTupleBaseType = <GenericType>getGlobalTypeOrUndefined("TupleBase" as __String, /*arity*/ 1) || globalArrayType;
2453024530
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
2453124531
globalThisType = <GenericType>getGlobalTypeOrUndefined("ThisType" as __String, /*arity*/ 1);
2453224532
}

0 commit comments

Comments
 (0)