mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 00:55:32 -05:00
Fix bug: FunctionDeclaration may have missing name (#20618)
This commit is contained in:
@@ -658,11 +658,10 @@ namespace ts.refactor.extractSymbol {
|
||||
case SyntaxKind.Constructor:
|
||||
return "constructor";
|
||||
case SyntaxKind.FunctionExpression:
|
||||
return scope.name
|
||||
? `function expression '${scope.name.text}'`
|
||||
: "anonymous function expression";
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
return `function '${scope.name.text}'`;
|
||||
return scope.name
|
||||
? `function '${scope.name.text}'`
|
||||
: "anonymous function";
|
||||
case SyntaxKind.ArrowFunction:
|
||||
return "arrow function";
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
|
||||
Reference in New Issue
Block a user