Sshow signature information if possible (even though signature resolution fails) in given location

This commit is contained in:
Sheetal Nandi
2014-10-07 15:28:08 -07:00
parent 23bdc50593
commit 05d428a2ec
3 changed files with 13 additions and 8 deletions

View File

@@ -2733,7 +2733,12 @@ module ts {
var useConstructSignatures = callExpression.kind === SyntaxKind.NewExpression || callExpression.func.kind === SyntaxKind.SuperKeyword;
var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
if (contains(allSignatures, signature.target || signature)) {
if (!contains(allSignatures, signature.target || signature)) {
// Get the first signature if there
signature = allSignatures.length ? allSignatures[0] : undefined;
}
if (signature) {
if (useConstructSignatures && (symbolFlags & SymbolFlags.Class)) {
// Constructor
symbolKind = ScriptElementKind.constructorImplementationElement;