mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Reuse stored types for any[] and Promise<any> instead of creating new ones (#17179)
* Reuse stored types for any[] and Promise<any> instead of creating new ones * Don't store anyPromiseType
This commit is contained in:
@@ -6892,7 +6892,7 @@ namespace ts {
|
||||
return globalFunctionType;
|
||||
case "Array":
|
||||
case "array":
|
||||
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
|
||||
return !node.typeArguments || !node.typeArguments.length ? anyArrayType : undefined;
|
||||
case "Promise":
|
||||
case "promise":
|
||||
return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined;
|
||||
|
||||
Reference in New Issue
Block a user