Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is reference path in vscode

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?

like image 520
DesirePRG Avatar asked Oct 18 '25 15:10

DesirePRG


1 Answers

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

like image 160
MacKentoch Avatar answered Oct 21 '25 04:10

MacKentoch