mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
fix(42133): fix instantiated undefined type from JS initializer (#42662)
This commit is contained in:
@@ -19489,8 +19489,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function isEmptyArrayLiteralType(type: Type): boolean {
|
||||
const elementType = isArrayType(type) ? getTypeArguments(type)[0] : undefined;
|
||||
return elementType === undefinedWideningType || elementType === implicitNeverType;
|
||||
const elementType = getElementTypeOfArrayType(type);
|
||||
return strictNullChecks ? elementType === implicitNeverType : elementType === undefinedWideningType;
|
||||
}
|
||||
|
||||
function isTupleLikeType(type: Type): boolean {
|
||||
|
||||
Reference in New Issue
Block a user