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:
Nathan Shively-Sanders 2019-12-04 09:06:42 -08:00 committed by GitHub
parent 7e572b6585
commit a816162923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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":