I'm referencing jquery in my typescript file but visual studio is telling me that it...
Could not find symbol '$'
Any ideas how to get rid of these errors?
ps - I am referencing jquery at the top of my typescript file as follows...
/// <reference path="./js/lib/jquery.min.js" />
You need to reference the jquery definition file jquery.d.ts
, not the javascript file. So :
/// <reference path="./jquery.d.ts" />
You can get this file from here : https://github.com/borisyankov/DefinitelyTyped/tree/master/jquery
You can see sample usage here : https://github.com/borisyankov/DefinitelyTyped/blob/master/jquery/jquery-tests.ts#L1
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