2019-08-29 18:19:04 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
// @Filename: foo.js
|
|
|
|
|
|
|
|
////var A;
|
|
|
|
////A.prototype = { };
|
|
|
|
////A.prototype = { m() {} };
|
|
|
|
////A.prototype.a = function() { };
|
|
|
|
////A.b = function() { };
|
2019-09-30 22:08:44 +02:00
|
|
|
////
|
|
|
|
////var B;
|
|
|
|
////B["prototype"] = { };
|
|
|
|
////B["prototype"] = { m() {} };
|
|
|
|
////B["prototype"]["a"] = function() { };
|
|
|
|
////B["b"] = function() { };
|
2019-08-29 18:19:04 +02:00
|
|
|
|
|
|
|
verify.navigationTree({
|
|
|
|
"text": "<global>",
|
|
|
|
"kind": "script",
|
2019-09-30 22:08:44 +02:00
|
|
|
"childItems": [{ name: "A", quoted: false }, { name: "B", quoted: true }].map(({ name, quoted }) => (
|
2019-08-29 18:19:04 +02:00
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": name,
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "class",
|
|
|
|
"childItems": [
|
|
|
|
{
|
|
|
|
"text": "constructor",
|
|
|
|
"kind": "constructor"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"text": "m",
|
|
|
|
"kind": "method"
|
|
|
|
},
|
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": quoted ? `"a"` : "a",
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "function"
|
|
|
|
},
|
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": quoted ? `"b"` : "b",
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "function"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-09-30 22:08:44 +02:00
|
|
|
))
|
2019-08-29 18:19:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
verify.navigationBar([
|
|
|
|
{
|
|
|
|
"text": "<global>",
|
|
|
|
"kind": "script",
|
2019-09-30 22:08:44 +02:00
|
|
|
"childItems": ["A", "B"].map(name => (
|
2019-08-29 18:19:04 +02:00
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": name,
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "class"
|
|
|
|
}
|
2019-09-30 22:08:44 +02:00
|
|
|
))
|
2019-08-29 18:19:04 +02:00
|
|
|
},
|
2019-09-30 22:08:44 +02:00
|
|
|
...[{ name: "A", quoted: false }, { name: "B", quoted: true }].map(({ name, quoted }) => ({
|
|
|
|
"text": name,
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "class",
|
|
|
|
"childItems": [
|
|
|
|
{
|
|
|
|
"text": "constructor",
|
|
|
|
"kind": "constructor"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"text": "m",
|
|
|
|
"kind": "method"
|
|
|
|
},
|
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": quoted ? `"a"` : "a",
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "function"
|
|
|
|
},
|
|
|
|
{
|
2019-09-30 22:08:44 +02:00
|
|
|
"text": quoted ? `"b"` : "b",
|
2019-08-29 18:19:04 +02:00
|
|
|
"kind": "function"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"indent": 1
|
2019-09-30 22:08:44 +02:00
|
|
|
}))
|
2019-08-29 18:19:04 +02:00
|
|
|
]);
|