I have the following code
var Top = (function () {
var LevelA = (function () {
var LevelA1a = (function () {
const method1 = () => { return 'Hello from LevelA1a.method1' }
const method2 = () => { return 'Hello from LevelA1a.method2' }
return {
method1: method1,
method2: method2
}
}()); // LevelA1a
var LevelB1b = () => { return 'Hello from LevelB1b' }
return {
LevelA1: LevelA1a,
LevelB1: LevelB1b
}
}()); // LevelA
var LevelB = () => { return 'Hello from LevelB' }
return {
LevelA: LevelA,
LevelB: LevelB
}
}());
When this code is included directly in my script it behaves exactly as I want it aka every time I press the dot the editor suggest me the next level. When this code is included in another script the editor stops suggesting after the first level (Top). How can I structure my code to have the direct included behavior when it is included as library?