Fix name printing in signature help
This commit is contained in:
parent
61d6663b32
commit
7367053313
2 changed files with 6 additions and 4 deletions
|
@ -923,7 +923,7 @@ module ts {
|
|||
resolvedReturnType: Type; // Resolved return type
|
||||
minArgumentCount: number; // Number of non-optional parameters
|
||||
hasRestParameter: boolean; // True if last parameter is rest parameter
|
||||
hasStringLiterals: boolean; // True if instantiated
|
||||
hasStringLiterals: boolean; // True if specialized
|
||||
target?: Signature; // Instantiation target
|
||||
mapper?: TypeMapper; // Instantiation mapper
|
||||
erasedSignatureCache?: Signature; // Erased version of signature (deferred)
|
||||
|
|
|
@ -3561,11 +3561,13 @@ module ts {
|
|||
if (isOptional) {
|
||||
display += "?";
|
||||
}
|
||||
display += ": " + typeInfoResolver.typeToString(typeInfoResolver.getTypeOfSymbol(p));
|
||||
display += ": " + typeInfoResolver.typeToString(typeInfoResolver.getTypeOfSymbol(p), argumentListOrTypeArgumentList);
|
||||
return new SignatureHelpParameter(p.name, "", display, isOptional);
|
||||
});
|
||||
var prefix = (candidateSignature.declaration.name.text || "") + "(";
|
||||
var suffix = "): " + typeInfoResolver.typeToString(candidateSignature.getReturnType());
|
||||
var callTarget = (<CallExpression>argumentListOrTypeArgumentList.parent).func;
|
||||
var signatureName = typeInfoResolver.symbolToString(typeInfoResolver.getSymbolInfo(callTarget), /*enclosingDeclaration*/ undefined, /*meaning*/ undefined);
|
||||
var prefix = signatureName + "(";
|
||||
var suffix = "): " + typeInfoResolver.typeToString(candidateSignature.getReturnType(), argumentListOrTypeArgumentList);
|
||||
return new SignatureHelpItem(candidateSignature.hasRestParameter, prefix, suffix, ", ", parameterHelpItems, "");
|
||||
});
|
||||
var selectedItemIndex = candidates.indexOf(bestSignature);
|
||||
|
|
Loading…
Reference in a new issue