* show more items in navbar * fixed missing node kind for property assignments * updated navBarNestedCommonJsExports test * updated navigationBarMerging_grandchildren test * updated navigationBarItemsFunctions test * updated navigationBarAnonymousClassAndFunctionExpressions test * updated navigationBarFunctionIndirectlyInVariableDeclaration test * updated navigationBarInitializerSpans test * updated navigationBarItemsPropertiesDefinedInConstructors test * updated tests * change nav icon for properties with function-like initializers * add test case for binding element with function-like initializer * add navigationBarNestedObjectLiterals test * add navigationBarFunctionLikePropertyAssignments test * made some silly names less silly (?) * added SpreadAssignments and ShorthandPropertyAssignments * new wording for primary menu items
144 lines
3.3 KiB
TypeScript
144 lines
3.3 KiB
TypeScript
/// <reference path="fourslash.ts"/>
|
|
|
|
////function foo() {
|
|
//// var x = 10;
|
|
//// function bar() {
|
|
//// var y = 10;
|
|
//// function biz() {
|
|
//// var z = 10;
|
|
//// }
|
|
//// function qux() {
|
|
//// // A function with an empty body should not be top level
|
|
//// }
|
|
//// }
|
|
////}
|
|
////
|
|
////function baz() {
|
|
//// var v = 10;
|
|
////}
|
|
|
|
verify.navigationTree({
|
|
"text": "<global>",
|
|
"kind": "script",
|
|
"childItems": [
|
|
{
|
|
"text": "baz",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "v",
|
|
"kind": "var"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"text": "foo",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "bar",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "biz",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "z",
|
|
"kind": "var"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"text": "qux",
|
|
"kind": "function"
|
|
},
|
|
{
|
|
"text": "y",
|
|
"kind": "var"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"text": "x",
|
|
"kind": "var"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
});
|
|
|
|
verify.navigationBar([
|
|
{
|
|
"text": "<global>",
|
|
"kind": "script",
|
|
"childItems": [
|
|
{
|
|
"text": "baz",
|
|
"kind": "function"
|
|
},
|
|
{
|
|
"text": "foo",
|
|
"kind": "function"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"text": "baz",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "v",
|
|
"kind": "var"
|
|
}
|
|
],
|
|
"indent": 1
|
|
},
|
|
{
|
|
"text": "foo",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "bar",
|
|
"kind": "function"
|
|
},
|
|
{
|
|
"text": "x",
|
|
"kind": "var"
|
|
}
|
|
],
|
|
"indent": 1
|
|
},
|
|
{
|
|
"text": "bar",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "biz",
|
|
"kind": "function"
|
|
},
|
|
{
|
|
"text": "qux",
|
|
"kind": "function"
|
|
},
|
|
{
|
|
"text": "y",
|
|
"kind": "var"
|
|
}
|
|
],
|
|
"indent": 2
|
|
},
|
|
{
|
|
"text": "biz",
|
|
"kind": "function",
|
|
"childItems": [
|
|
{
|
|
"text": "z",
|
|
"kind": "var"
|
|
}
|
|
],
|
|
"indent": 3
|
|
},
|
|
|
|
]);
|