8000 Make code resilient for signature declarations without close parens. · imskojs/TypeScript@d0fdbf8 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0fdbf8

Browse files
Make code resilient for signature declarations without close parens.
1 parent 63a4172 commit d0fdbf8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/services/services.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5274,7 +5274,10 @@ module ts {
52745274
break;
52755275
default:
52765276
if (isAnyFunction(node) && node.kind !== SyntaxKind.Constructor && !(<SignatureDeclaration>node).type) {
5277-
result.push(signatureDeclarationLikeToInlineInfo(<SignatureDeclaration>node));
5277+
var signatureInlineInfo = signatureDeclarationLikeToInlineInfo(<SignatureDeclaration>node);
5278+
if (signatureInlineInfo) {
5279+
result.push(signatureInlineInfo);
5280+
}
52785281
}
52795282
}
52805283

@@ -5302,6 +5305,10 @@ module ts {
53025305
var children = node.getChildren();
53035306
var closeParen = forEach(children, child => child.kind === SyntaxKind.CloseParenToken && child);
53045307

5308+
if (!closeParen) {
5309+
return undefined;
5310+
}
5311+
53055312
var position = closeParen.getEnd();
53065313
var signature = typeInfoResolver.getSignatureFromDeclaration(node);
53075314
var returnType = typeInfoResolver.getReturnTypeOfSignature(signature);

0 commit comments

Comments
 (0)
0