Vaethin
Vaethin

Reputation: 346

typings install vs. @types

I'm trying to learn how to include Angular into a MVC web-server right now.

I'm following this guide: http://www.mithunvp.com/using-angular-2-asp-net-mvc-5-visual-studio/

Found out by googling and through the npm warning that typings install isn't used any more. Apparently now you would use some variation of "npm install @types/..." or something like that.

The problem is, I don't know what I'm doing. I have a typings.json file from the tutorial :

"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"node": "registry:dt/node#6.0.0+20160909174046"}
}

Do I just add these to the package.json and hope I'm done with it? or "@types/dependencyName"? Or do it with NPM ?

If anyone has another, up to date guide on how to integrate Angular 2.x/4.x into a Asp.Net-MVC web-app in Visual Studio 2017 I would very much appreciate that as well, preferably without the whole gulpfile thing.

Upvotes: 2

Views: 1224

Answers (1)

Andrei Matracaru
Andrei Matracaru

Reputation: 3671

The typings vs @types topic has to do with the Typescript version you are using.

@types were introduced with Typescript 2, while typings was just a third party tool designed to ease the installation of type definition files (.d.ts) in Typescript 1. You can read more about it here: The Future of Declaration Files

Upvotes: 3

Related Questions