mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Properly guard for undefined in getTypeReferenceArity
This commit is contained in:
@@ -4979,7 +4979,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getTypeReferenceArity(type: TypeReference): number {
|
||||
return type.target.typeParameters.length;
|
||||
return type.target.typeParameters ? type.target.typeParameters.length : 0;
|
||||
}
|
||||
|
||||
// Get type from reference to class or interface
|
||||
|
||||
Reference in New Issue
Block a user