File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7567,8 +7567,8 @@ namespace ts {
75677567
75687568 function getReturnTypeOfTypeTag(node: SignatureDeclaration | JSDocSignature) {
75697569 const typeTag = isInJavaScriptFile(node) ? getJSDocTypeTag(node) : undefined;
7570- const signatures = typeTag && typeTag.typeExpression && getSignaturesOfType (getTypeFromTypeNode(typeTag.typeExpression), SignatureKind.Call );
7571- return signatures && signatures.length === 1 ? getReturnTypeOfSignature(signatures[0]) : undefined ;
7570+ const signature = typeTag && typeTag.typeExpression && getSingleCallSignature (getTypeFromTypeNode(typeTag.typeExpression));
7571+ return signature && getReturnTypeOfSignature(getErasedSignature(signature)) ;
75727572 }
75737573
75747574 function containsArgumentsReference(declaration: SignatureDeclaration): boolean {
@@ -7698,7 +7698,7 @@ namespace ts {
76987698
76997699 function getReturnTypeFromAnnotationOrBody(declaration: SignatureDeclaration | JSDocSignature) {
77007700 if (declaration.kind === SyntaxKind.Constructor) {
7701- return getDeclaredTypeOfClassOrInterface(getMergedSymbol((<ClassDeclaration>declaration.parent).symbol))
7701+ return getDeclaredTypeOfClassOrInterface(getMergedSymbol((<ClassDeclaration>declaration.parent).symbol));
77027702 }
77037703 if (isJSDocConstructSignature(declaration)) {
77047704 return getTypeFromTypeNode((declaration.parameters[0] as ParameterDeclaration).type!); // TODO: GH#18217
You can’t perform that action at this time.
0 commit comments