Visual Studio 2015, Typescript, and angular2 using tsconfig.json

I tested the latest version of Angular2 (2.0.0-alpha.44) along with Visual Studio 2015. Here are the versions of everything I use are relevant to this problem:

  • Visual studio 2015
  • Asp.NET 5
  • Typescript 1.6
  • Resharper 10
  • Angular 2.0.0-alpha.44

Here is my solution:

solution explorer

All my typescript are in the / Ts directory, which also has the tsconfig.json file . This makes Visual Studio a virtual typescript project.

tsconfig.json solution with virtual project ts

As soon as I put the line import {Component, bootstrap} from "angular2/angular2";in my main.ts file, it will find the Angular2 library files in my directory node_modulesand display them too (not sure if there is still a structure for the smoothed directories)

ts resharper warning

typescript (main.ts). , .ts ( Angular2 in), outFile tsconfig. JSON

Resharper Component bootstrap, , , , . , .

Angular2 , typescript tsconfig.json, .ts app.js ../wwwroot/js/app.js

ts resharper warning with tooltip

- , VS2015, typescript Angular2, ?

+4
3

TypeScript :

TypeScript, ECMAScript 2015, , .

, JS , TypeScript JS . , -outFile JavaScript.

, , , " angular2 ". outFile . outDir.

, tsconfig , Visual Studio , .

+2

. , d.ts . , - -38 39.

-38 39 , , , , -, .

, , , resharper ( , ). , 26, :

https://github.com/microsoft/ngconf2015demo

, , -.

, UpdateAdapter, :

http://blog.thoughtram.io/angular/2015/10/24/upgrading-apps-to-angular-2-using-ngupgrade.html

, , , angular1 angular2.

( -). 39, . , . , , d.ts , .

, AMD, . . , es5, , angular2 ( , , , alpha 26).

, , ( , angular2 , ), . , , !

, angular2 , angular2 . , , , angular 1.4, UpgradeAdapter (ngUpgrade) , angular2 .

:

, , angular2 tsd. d.ts angular2, typescript.

+1

ASP.Net 5 angular 2.0 , . .

all.ts .js , .

PowerShell → "tsc". .

If you want to compile the entire .js file when the .ts file is saved / updated, enter "tsc-watch" in PowerShell and do not close it.

You must install Node.

Create the following file and the data should be the same as from Quick Start Angualr

tsconfig.json
typings.json
package.json

Visual Studio plugin for opening the project root folder in CMD or PowerShell

0
source

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


All Articles