mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix out-of-bounds issue in getParameterNameAtPosition
This commit is contained in:
1 parent
e383b0d4f7
commit
3afe0a4d43
1 file changed
+1
-1
@@ -21641,7 +21641,7 @@ namespace ts {
|
||||
if (isTupleType(restType)) {
|
||||
const associatedNames = (<TupleType>(<TypeReference>restType).target).associatedNames;
|
||||
const index = pos - paramCount;
|
||||
return associatedNames ? associatedNames[index] : restParameter.escapedName + "_" + index as __String;
|
||||
return associatedNames && associatedNames[index] || restParameter.escapedName + "_" + index as __String;
|
||||
}
|
||||
return restParameter.escapedName;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user