mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Fix out-of-bounds issue in getParameterNameAtPosition
This commit is contained in:
@@ -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