TypeScript/tests/cases/fourslash/navigationBarFunctionPrototype.ts
Jesse Trinity fd6fbdf7fe
Show more items in the navbar (#33040)
* 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
2019-09-11 15:54:27 -07:00

141 lines
3.1 KiB
TypeScript

/// <reference path="fourslash.ts"/>
// @Filename: foo.js
////function f() {}
////f.prototype.x = 0;
////f.y = 0;
////f.prototype.method = function () {};
////Object.defineProperty(f, 'staticProp', {
//// set: function() {},
//// get: function(){
//// }
////});
////Object.defineProperty(f.prototype, 'name', {
//// set: function() {},
//// get: function(){
//// }
////});
verify.navigationTree({
"text": "<global>",
"kind": "script",
"childItems": [
{
"text": "f",
"kind": "class",
"childItems": [
{
"text": "constructor",
"kind": "constructor"
},
{
"text": "x",
"kind": "property"
},
{
"text": "y"
},
{
"text": "method",
"kind": "function"
},
{
"text": "staticProp",
"childItems": [
{
"text": "get",
"kind": "method"
},
{
"text": "set",
"kind": "method"
}
]
},
{
"text": "name",
"childItems": [
{
"text": "get",
"kind": "method"
},
{
"text": "set",
"kind": "method"
}
]
}
]
}
]
});
verify.navigationBar([
{
"text": "<global>",
"kind": "script",
"childItems": [
{
"text": "f",
"kind": "class"
}
]
},
{
"text": "f",
"kind": "class",
"childItems": [
{
"text": "constructor",
"kind": "constructor"
},
{
"text": "x",
"kind": "property"
},
{
"text": "y"
},
{
"text": "method",
"kind": "function"
},
{
"text": "staticProp"
},
{
"text": "name"
}
],
"indent": 1
},
{
"text": "staticProp",
"childItems": [
{
"text": "get",
"kind": "method"
},
{
"text": "set",
"kind": "method"
}
],
"indent": 2
},
{
"text": "name",
"childItems": [
{
"text": "get",
"kind": "method"
},
{
"text": "set",
"kind": "method"
}
],
"indent": 2
}
]);