mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Properly guard for undefined in getTypeReferenceArity
This commit is contained in:
1 parent
2e8d11e9c0
commit
4e56fc0d27
1 file changed
+1
-1
@@ -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