I’ve searched the repo samples and did not find anything to help with this. I’ve found about the @js directive that seems promising but how to use this with the dotvvm object? Is there a *.map file somewhere that we can use? I’ve run out of ideas.
In WebForms we had this trick which gave us all the suggestions/Intellisense of what we specified as import:
I’ve tried with the RequiredResource control. No luck.
RequiredResource controls only enforce that a specific script is included in the page. Since
dotvvm.internal are always included, you can safely delete those.
dotvvm.businesspack is automatically included when you use a BP control.
dotvvm.debug is always included in debug mode, you most likely don’t want it in production (it display the red notification when a postback does not run, for example). I think you can remove them all.
The Dependencies also enforces that the resources are included in page, but also makes sure to place the InlineScript after the specified resources, so I’d keep that.
Sure, I appreciate your detailed and considered explanation from which I’ve learned something useful. But the
RequiredResource image example was just my desperate attempt at maybe getting the intellisense to give me something for
dotvvm object in JS.
I will see about this and get back with feedback…
I am now dealing with this
This created another .js file and these 2 files exist just for the sake of build to work.
Do you know an alternative for this?
PS: my tsconfig.json:
The intellisense is not working while the documentation page states it should…
What am I missing here?
I’ve managed to squeeze some intellisense by doing an import:
But it seems I’m on a wrong path because I am not able to find the events themselves (in the picture we cannot see any
initCompleted in the list).
OK, so I’ve managed to obtain the intellisense for the dotvvm object and its members:
BUT! This is inside a .ts file. Instead I need the intellisense in the markup files (.dothtml ; .dotcontrol). Is my requirement feasible?
Alright, after some great fiddling and jiggling and without any further ado,
I present you my nuggety-brown hackish-workaround :
If anybody happens to know a better way, please let me know.