How to use links with triple slashes for libraries in Visual Studio Code?

I am trying to get Visual Studio Code 0.3.0 to recognize my JavaScript libraries. However, intellisense complains. Here is reproduced:

  • Open Visual Studio Code
  • File> Open Folder (select the newly created empty folder)
  • Add a file mytest.jsto this folder
  • Download jquery-2.1.4.js(full / uncompressed) to this folder (displayed in the sidebar)
  • Enter this in mytest.js:

    var x = jQuery('body');
    

Result: squiggly green lines under jQuery. Note that jQuery is just an example, I had the same issue with libraries like KnockoutJS and QUnit, etc.

I tried adding a link to a triple slash like this:

/// <reference path="jquery-2.1.4.js" />

, path . , . a ./ , , , :

screenshot of end product with squiggly lines

jQuery :

"jQuery".
any

. . ?

+4
2

jQuery TypeScript.


'typings' . "typings" jquery.d.ts.

, / typings/jquery.d.ts:

/// <reference path="../../typings/jquery/jquery.d.ts"/>

TypeScript Node.js:

/// <reference path="typings/node/node.d.ts"/>

- squiggly VSCode, light bulb Add /// reference to 'XYZ.d.ts'. , .

- , .

+3

VS Code, Visual Studio , . , :

(function($) {
    var x = $('body');
})(jQuery); 

(x, ), , , (, $) , . , requireJS - .

, squigglies?

0

All Articles