Help file input from a global folder or absolute from a project

I know TypeScript is new, but just playing with it.

I tried to convert several .js files that use jQuery and for intellisense to work. I need to reference the jquery.d.ts file at the top, for example

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

This is good, but then you also need to have the file in the same directory. I want to link to the input file all over the world, and not to the file, so if I move the js file, I do not need to correct the reference path to the input file.

Is it possible to make them with respect to a solution, or perhaps place them in a global folder that automatically loads.

I use the web basics for visual studio 2012, so I get a preview and other nice features.

Hope there is a solution for this.

+4
source share
2 answers

The "Reference Directives" section of this link states that the following is supported:

 /// <reference path="~/Scripts/ScriptFile4.js" /> 

However, I could not get it to work for typescript files. I think this is not supported for typescript.

+1
source

Global or relative project paths are not supported. There is a function request here:

Absolute root path for link / import

https://typescript.codeplex.com/workitem/1414

0
source

Source: https://habr.com/ru/post/1438032/


All Articles