/// ////global.cls = class { }; ////(function() { //// const x = () => { //// // Presence of inner function causes x to be a top-level function. //// function xx() {} //// }; //// const y = { //// // This is not a top-level function (contains nothing, but shows up in childItems of its parent.) //// foo: function() {} //// }; //// (function nest() { //// function moreNest() {} //// })(); ////})(); ////(function() { // Different anonymous functions are not merged //// // These will only show up as childItems. //// function z() {} //// console.log(function() {}) //// describe("this", 'function', `is a function`, `but this ${"wont"} show`, () => {}); //// [].map(() => {}); ////}) ////(function classes() { //// // Classes show up in top-level regardless of whether they have names or inner declarations. //// const cls2 = class { }; //// console.log(class cls3 {}); //// (class { }); ////}) verify.navigationTree({ "text": "", "kind": "script", "childItems": [ { "text": "", "kind": "function", "childItems": [ { "text": "nest", "kind": "function", "childItems": [ { "text": "moreNest", "kind": "function" } ] }, { "text": "x", "kind": "const", "childItems": [ { "text": "xx", "kind": "function" } ] }, { "text": "y", "kind": "const", "childItems": [ { "text": "foo", "kind": "method" } ] } ] }, { "text": "", "kind": "function", "childItems": [ { "text": "console.log() callback", "kind": "function" }, { "text": `describe("this", 'function', \`is a function\`) callback`, "kind": "function" }, { "text": `map() callback`, "kind": "function" }, { "text": "z", "kind": "function" } ] }, { "text": "classes", "kind": "function", "childItems": [ { "text": "", "kind": "class" }, { "text": "cls2", "kind": "const" }, { "text": "cls3", "kind": "class" } ] }, { "text": "cls", "kind": "class" } ] }); verify.navigationBar([ { "text": "", "kind": "script", "childItems": [ { "text": "", "kind": "function" }, { "text": "", "kind": "function" }, { "text": "classes", "kind": "function" }, { "text": "cls", "kind": "class" } ] }, { "text": "", "kind": "function", "childItems": [ { "text": "nest", "kind": "function" }, { "text": "x", "kind": "const" }, { "text": "y", "kind": "const" } ], "indent": 1 }, { "text": "nest", "kind": "function", "childItems": [ { "text": "moreNest", "kind": "function" } ], "indent": 2 }, { "text": "x", "kind": "const", "childItems": [ { "text": "xx", "kind": "function" } ], "indent": 2 }, { "text": "y", "kind": "const", "childItems": [ { "text": "foo", "kind": "method" } ], "indent": 2 }, { "text": "", "kind": "function", "childItems": [ { "text": "console.log() callback", "kind": "function" }, { "text": `describe("this", 'function', \`is a function\`) callback`, "kind": "function" }, { "text": `map() callback`, "kind": "function" }, { "text": "z", "kind": "function" } ], "indent": 1 }, { "text": "classes", "kind": "function", "childItems": [ { "text": "", "kind": "class" }, { "text": "cls2", "kind": "const" }, { "text": "cls3", "kind": "class" } ], "indent": 1 }, { "text": "", "kind": "class", "indent": 2 }, { "text": "cls3", "kind": "class", "indent": 2 }, { "text": "cls", "kind": "class", "indent": 1 } ]);