mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
handle generic types in getArrayifiedType (#30606)
This commit is contained in:
@@ -20443,7 +20443,7 @@ namespace ts {
|
||||
|
||||
function getArrayifiedType(type: Type) {
|
||||
if (forEachType(type, t => !(t.flags & (TypeFlags.Any | TypeFlags.Instantiable) || isArrayType(t) || isTupleType(t)))) {
|
||||
return createArrayType(getIndexTypeOfType(type, IndexKind.Number) || errorType);
|
||||
return createArrayType(getIndexedAccessType(type, numberType));
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user