mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Make sure autoArrayType is unique, even if no lib is available (#20344)
* Make sure autoArrayType is unique, even if no lib is available * fix typo
This commit is contained in:
@@ -25170,7 +25170,12 @@ namespace ts {
|
||||
globalBooleanType = getGlobalType("Boolean" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
globalRegExpType = getGlobalType("RegExp" as __String, /*arity*/ 0, /*reportErrors*/ true);
|
||||
anyArrayType = createArrayType(anyType);
|
||||
|
||||
autoArrayType = createArrayType(autoType);
|
||||
if (autoArrayType === emptyObjectType) {
|
||||
// autoArrayType is used as a marker, so even if global Array type is not defined, it needs to be a unique type
|
||||
autoArrayType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
|
||||
}
|
||||
|
||||
globalReadonlyArrayType = <GenericType>getGlobalTypeOrUndefined("ReadonlyArray" as __String, /*arity*/ 1);
|
||||
anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
|
||||
|
||||
Reference in New Issue
Block a user