mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
handle binding patterns correctly when getting script lexical structure
This commit is contained in:
1 parent
29776f4e9b
commit
b05f2bf1a3
2 files changed
+5
-1
No files matched your search
@@ -51,7 +51,7 @@ module ts.NavigationBar {
|
||||
forEach((<BindingPattern>node).elements, visit);
|
||||
break;
|
||||
case SyntaxKind.VariableDeclaration:
|
||||
if (isBindingPattern(node)) {
|
||||
if (isBindingPattern((<VariableDeclaration>node).name)) {
|
||||
visit((<VariableDeclaration>node).name);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
////var foo, {}
|
||||
////var bar, []
|
||||
verify.getScriptLexicalStructureListCount(3); // global (1) + variable declarations (2)
|
||||
Reference in new issue
Block a user