mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06: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:
parent
2a219af308
commit
5d46ca7118
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user