There is a code in the js file:
// Session ID var hfSessionId = $('[id*=hfSessionId]').val(); // User Id var hfUserId = $('[id*=hfUserId]').val(); He works. I write in TypeScript in VisualStudio. How do I write similar code? The compiler swears at the $ sign. I tried to do this:
module GameVals { // Session ID export var hfSessionId: any = $('[id*=hfSessionId]').val(); // User Id export var hfUserId: any = $('[id*=hfUserId]').val(); } Swears "Cannot find name '$'" and do not compile. How to solve a problem? Need to make a separate js file for this code and somehow access it from ts? Or is it necessary to somehow ignore the compiler error? Or am I writing wrong? It seems like you can write js code directly in ts?