mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Properly guard for undefined in getTypeReferenceArity
This commit is contained in:
parent
2e8d11e9c0
commit
4e56fc0d27
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user