mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Make constructor use merged parent symbol
Previously in getSignatureFromDeclaration, it just used the parent symbol without checking whether it was merged.
This commit is contained in:
@@ -3679,7 +3679,9 @@ namespace ts {
|
||||
function getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature {
|
||||
let links = getNodeLinks(declaration);
|
||||
if (!links.resolvedSignature) {
|
||||
let classType = declaration.kind === SyntaxKind.Constructor ? getDeclaredTypeOfClassOrInterface((<ClassDeclaration>declaration.parent).symbol) : undefined;
|
||||
let classType = declaration.kind === SyntaxKind.Constructor ?
|
||||
getDeclaredTypeOfClassOrInterface(getMergedSymbol((<ClassDeclaration>declaration.parent).symbol))
|
||||
: undefined;
|
||||
let typeParameters = classType ? classType.localTypeParameters :
|
||||
declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined;
|
||||
let parameters: Symbol[] = [];
|
||||
|
||||
Reference in New Issue
Block a user