问题
I have downloaded Visual Studio Code for linux, and I am playing around with it. I wanted to use jQuery intellisense with it, and found a way to do it on the internet. Once I did it some sort of directive was added to my js file.
/// <reference path="typings/jquery/jquery.d.ts"/>
what does /// mean to pure javascript? it's not a comment, so how does javascript interpreter deal with this. also I am unable to find the path typings/jquery/jquery.d.ts
in the local vscode folder. (although there is a typings folder there is no folder or file named jquery). So from where is this file linked to my js file?
回答1:
Vscode will see :
/// <reference path="typings/jquery/jquery.d.ts"/>
and know it must use intellisense jQuery
.
Intellisense is a vscode feature that provides instant context-aware help when writing code. It has nothing to do with your own sourcecode.
Here a really good explanation : vscode intellisense
来源:https://stackoverflow.com/questions/30136319/what-is-reference-path-in-vscode