Remove unneeded Array and Promise JS rewrites (#35482)
Type-argument defaulting is handled elsewhere in the compiler. This is a small drive-by improvement, so I didn't change the handling of 'array' or 'promise'; they still manually create `any[]` and `Promise<any>`, respectively.
This commit is contained in:
parent
7e572b6585
commit
a816162923
1 changed files with 0 additions and 2 deletions
|
@ -10921,10 +10921,8 @@ namespace ts {
|
|||
case "function":
|
||||
checkNoTypeArguments(node);
|
||||
return globalFunctionType;
|
||||
case "Array":
|
||||
case "array":
|
||||
return (!typeArgs || !typeArgs.length) && !noImplicitAny ? anyArrayType : undefined;
|
||||
case "Promise":
|
||||
case "promise":
|
||||
return (!typeArgs || !typeArgs.length) && !noImplicitAny ? createPromiseType(anyType) : undefined;
|
||||
case "Object":
|
||||
|
|
Loading…
Reference in a new issue