I'm used to C# so I'm trying to add typed objects feeling to my code just to make it more organized ( I know js don't have types... ).
so when I have an object that always has the same structure in the code, I'm declaring it like that in a module:
this.variable = 1;
so when I'm doing this:
var myObject = new MyObject();
I get autocomplete to all its variables and I also can see all of the comments.
This way I get less typo mistakes and more organized code.
the problem appears when passing the object into functions like so:
here I'm losing all the autocomplete and comments like it is some random object.
even though when I hover with my mouse on the object parameter in the function it will say (type: MyObject).
I've tried the same thing with visual studio and it kept this functionality.
Is there any way to fix it in the cloud code editor too?
And I don't want to use external programs to edit and import back and forth this is a really bad solution since I dont have all the basic GameSparks system auto-completion and comments.
I'm only exporting the code to my computer so I can search for keywords all over the project and not only in one script.
(Which would be great if I could do it in the cloud code editor itself).
You do this in the following format: