[SOLVED] How to get the global methods to display when I want to call them

So, I crated a method in a ‘namespace’ (at least I think of it as a namespace) that looks like this:

But I can’t see the method when I write myApp.debug (I can see the myApp and I can see the .debug but can’t see the “tryCreateDebugText” method. Like in the image below:


Can anybody explain to me how to make it visible in other scripts (‘classes’).

Hi @JustVlaxx,

I think the VS Code autocomplete intellisense even though it’s quite good it may struggle to understand the type of the object.

It may help if you use the newer ES6 classes instead of that anonymous method.

I don’t quite understand what you mean. If it’s not a problem can you provide me a link to any document/example that highlights the implementation?

Is it maybe something like this:

1 Like

Yes, that’s what I meant.

1 Like

Oh, that was easy.

Thank you very much! :slight_smile:

1 Like