Reputation: 3570
I'm using Angular 2 in my web project, and as such need TypeScript to suport experimental decorators such as @View. This can be done in tsconfig.json with "experimentalDecorators": true
but I see no such option in Visual Studio's project settings. (I created a TypeScript Project.) As such, I need Visual Studio to detect and use my tsconfig.json file.
I've read various places online that Visual Studio should pick up and use a tsconfig.json if it's present in the project's root directory. However this is not happening. I am using Visual Studio 2013 Update 4 -- and upgrading to Update 5 as I write this.
Does anyone know how to get Visual Studio 2013 (NOT Visual Studio Code, and NOT Visual Studio 2015) to use the tsconfig.json file? Maybe it needs to be in the solution's root instead of the project's root?
Failing that I can try adding a pre-build event to call tsc directly... but that seems sloppy.
Upvotes: 5
Views: 2282
Reputation: 4486
I also was looking for this. It appears that Visual Studio 2013-2015 not support tsconfig.json yet. Currently you need to edit your project file.
Edit: With Typescript 1.8 release Visual Studio 2015 seams to fully support .tsconfig. See http://www.typescriptlang.org/docs/release-notes/typescript-1.8.html
Upvotes: 2
Reputation: 3758
The following question: What are the TypeScript project build configuration options? points to a .targets file where the TypeScript configuration options are defined.
You could manually modify that .targets file to add support for experimentalDecorators, although that's not scalable because you'd have to do that to each developer's machine.
Upvotes: 0