Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio specify definition file

I am using the typescript definition manager to manage TypeScript definitions for a project I'm developing in Visual Studio 2015.

It creates a "tsd.d.ts" file that references all type def files installed with tsd. This is great because just this can be referenceed in TypeScript files rather than many, many type definition files.

However, it would be great if even this was not necessary. Is there any way to tell Visual Studio about this file so I don't have to put a a reference path like this at the top of every TypeScript file? -

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

I think I can reference it in the tsconfig.json file for compilation, but things still break at design time.

like image 464
user210757 Avatar asked Aug 13 '15 21:08

user210757


1 Answers

Include .d.ts file to your project with TypeScriptCompile build action:

TypeScriptCompile build action

After that just remove all reference comments, all works without them.

Also you can search for typings without TSD just from Solution Explorer menu:

Search for typings

like image 50
Artem Avatar answered Oct 23 '22 04:10

Artem