ASP.NET Core 2: Adding Typescript Typings the Easy way

Typings are meta data for javascript objects to help ensure your TypeScript is correctly written. Here’s the easy way to add them to your ASP.NET Core 2 project.

Step 1: Add this Visual Studio 2017 Plugin

PackageInstaller

Step 2: Open or create a ASP.NET Core 2 project. Right Click the project and choose “Quick Install

QuickInstalll

Step 3: Add the Typing Engine from npm. It might take a few minutes. npm will add Typings suppport….

Typings engine

Step 4: Change the kind to Typing then select jQuery (or any other one there)

typing jquery

A new Typing folder is added.

typing folder

Step 5: Drag and drop the index.d.ts file in the root of the Typings folder to the top of your .ts files.

drag typings

That’s it! You now have Typings support in your TypeScript files.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s