Skip to content

Commit

Permalink
change type (#51231)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Oct 19, 2022
1 parent 245a02c commit 8ac4652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/goToDefinition.ts
Expand Up @@ -28,7 +28,7 @@ namespace ts.GoToDefinition {

if (node.kind === SyntaxKind.ReturnKeyword) {
const functionDeclaration = findAncestor(node.parent, n =>
isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)) as FunctionLikeDeclaration;
isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)) as FunctionLikeDeclaration | undefined;
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
}

Expand Down

0 comments on commit 8ac4652

Please sign in to comment.