Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/services/navigationBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ module ts.NavigationBar {
});

// Add the constructor parameters in as children of the class (for property parameters).
// Note that *all* parameters will be added to the nodes array, but parameters that
// Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that
// are not properties will be filtered out later by createChildItem.
var nodes: Node[] = removeDynamicallyNamedProperties(node);
if (constructor) {
nodes.push.apply(nodes, constructor.parameters);
nodes.push.apply(nodes, filter(constructor.parameters, p => !isBindingPattern(p.name)));
}

var childItems = getItemsWorker(sortNodes(nodes), createChildItem);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference path='fourslash.ts'/>

////class A {
//// x: any
//// constructor([a]: any) {
//// }
////}
////class B {
//// x: any;
//// constructor( {a} = { a: 1 }) {
//// }
////}

verify.getScriptLexicalStructureListCount(6); // 2x(class + field + constructor)