mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
handle generic types in getArrayifiedType (#30606)
This commit is contained in:
1 parent
2eea21636b
commit
1a4c15fb11
6 files changed
+94
-1
No files matched your search
@@ -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