mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Fix test and rename a function
This commit is contained in:
parent
30761ef659
commit
38e201eb7d
@ -2960,9 +2960,9 @@ namespace ts {
|
||||
case SyntaxKind.TypeAliasDeclaration: return ScriptElementKind.typeElement;
|
||||
case SyntaxKind.EnumDeclaration: return ScriptElementKind.enumElement;
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
return variableDeclarationKind(<VariableDeclaration> node);
|
||||
return getKindOfVariableDeclaration(<VariableDeclaration> node);
|
||||
case SyntaxKind.BindingElement:
|
||||
return variableDeclarationKind(<VariableDeclaration> getRootDeclaration(node));
|
||||
return getKindOfVariableDeclaration(<VariableDeclaration> getRootDeclaration(node));
|
||||
case SyntaxKind.ArrowFunction:
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
@ -2990,10 +2990,11 @@ namespace ts {
|
||||
return ScriptElementKind.alias;
|
||||
case SyntaxKind.JSDocTypedefTag:
|
||||
return ScriptElementKind.typeElement;
|
||||
default:
|
||||
return ScriptElementKind.unknown;
|
||||
}
|
||||
return ScriptElementKind.unknown;
|
||||
|
||||
function variableDeclarationKind(v: VariableDeclaration): string {
|
||||
function getKindOfVariableDeclaration(v: VariableDeclaration): string {
|
||||
return isConst(v)
|
||||
? ScriptElementKind.constElement
|
||||
: isLet(v)
|
||||
|
||||
@ -22,15 +22,15 @@ verify.navigationBar([
|
||||
"childItems": [
|
||||
{
|
||||
"text": "a",
|
||||
"kind": "property"
|
||||
"kind": "const"
|
||||
},
|
||||
{
|
||||
"text": "b",
|
||||
"kind": "property"
|
||||
"kind": "const"
|
||||
},
|
||||
{
|
||||
"text": "c",
|
||||
"kind": "property"
|
||||
"kind": "const"
|
||||
}
|
||||
],
|
||||
"indent": 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user