Introduction
This article will cover the following.
- Brief Concepts
- Implementation – Download and install TypeScript using NPM
- Implementation – Download and install TypeScript in VS 2015 for IntelliSense
- Implementation – Create a basic Customer application with a few core concepts using TypeScript and VS 2015
- Class, Property creation, and Method creation
- Inheritance
- Getter and setter
- Exception with try, catch and finally
- Export and import concept
- Loader concept -- SystemJS
What is TypeScript?
- It is an open-source language created by Microsoft in October 2012.
- It is designed for the development of large applications.
- It is a typed superset of JavaScript that compiles to JavaScript eventually.
Benefits of Typescript
- Coverts to JavaScript only
TypeScript converts the OO code into the JavaScript only by providing the power of object-orientation.
- Rapid Application Development
Because of the object-oriented concepts, it allows us to write code very quickly and clean as well.
- Incorporate all features of Javascript
TypeScript community is constantly upgrading their version by incorporating all the features of ECMA 5 and later versions, so it's worth to rely on.
Implementation – Download and install TypeScript using NPM
Steps to be followed
- Go to the URL -- https://www.typescriptlang.org/#download-links and install TypeScript using NPM. For that, you need to install Node.

Here, you are good to go with TypeScript then.
Implementation – Download and install TypeScript in VS 2015 for IntelliSense.
Steps to be followed
- Visit the URL -- https://www.microsoft.com/en-us/download/confirmation.aspx?id=48593, and download and then install. Make sure, your VS is closed at that time.
Implementation – Create a basic Customer application using TypeScript with a few core concepts using VS 2015.
- Class, Property creation and Method creation
- Inheritance
- Getter and setter
- Exception with try, catch and finally
- Interface
- Export and import concept
- Loader concept -- SystemJS
Steps to be followed
- Open VS 2015 and create a project named “TypeScript-Sample-1” and choose empty template.

- Create a Customer.html file and add a blank <script> tag here.

- Create a Customer.ts file

Class, Property creation and Method Concept
- Create a class named Customer and save the file. We can see the auto-generated Customer.js file in VS.

- Refer to the Customer.js file in the HTML file.


















Tom LarryPosted Mar 24, 2018, 2:05 PM
Another question, is TSConfig.json required for TypeScript for Visual Studio?
Tom LarryPosted Mar 24, 2018, 1:57 PM
Gourav, nice work. Downloaded the code, F5, trapped into system.js, dt=Promise.resolved();