I am only using one line of jQuery in my application:
$("div.printArea").printArea();
But this is giving me a Typescript error:
The property 'printArea' does not exist on type JQuery?
Can someone tell me how I can stop this error appearing?
You could cast it to <any>
or extend the jquery typing to add your own method.
(<any>$("div.printArea")).printArea();
//Or add your own custom methods (Assuming this is added by yourself as a part of custom plugin)
interface JQuery { printArea():void; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With