How to use TypeScript in your ASP.NET MVC Project

ZeroesAndOnes
9 min readJan 27, 2022

In this article I will walk you through the steps demonstrating how to use TypeScript in your ASP.NET MVC project.

1 — What is TypeScript?

TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. TypeScript is designed for the development of large applications and transcompiles to JavaScript.

To learn more about TypeScript you can visit the official website by clicking on this link:

2 — Create a directory for your TypeScript code

In your MVC solution you will need to create a folder where all of your TypeScript files will reside. In this example I am going to call the folder “TSScripts” (You can name this folder anything you would like).

I created the “TSScripts” folder at the root directory of my “TypeScriptProject” project. Below is a screen shot of the folder structures so far.

--

--