I’m having an error while compiling the following code located in a typescript file:
parent.$(mySelector)
Here I’m having an error on the $ sign who is unknown for the typescript compiler. Jquery is referenced through the definition file. What could I do to still be able to use this method of writing my code?
The proper error I’m having is the following:
The property '$' does not exist on value of type 'Window'
You need to define $ variable for Window object, since JQuery definition file doesn’t do that:
and whenerver you use Window object cast it to JQueryWindow