mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Sshow signature information if possible (even though signature resolution fails) in given location
This commit is contained in:
1 parent
23bdc50593
commit
05d428a2ec
3 files changed
+13
-8
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user