|Getting Started With TypeScript|
|Written by Mike James|
|Thursday, 12 April 2018|
Page 1 of 3
A Programmers Guide To Languages
TypeScript from Anders Hejlsberg
For this reason alone the new language deserves your consideration even if you finally decided that you can live without it.
Before we get into the details of the language, we take a small detour into using it in Visual Studio. If you are only interested in the language then skip this section.
Getting started is fairly easy. You can just download the compiler and use any text editor you like but the easiest way to get to know TypeScript is via Visual Studio and the special addin. The addin is automatically included in Visual Studio 2017 and later and works in the free Community edition. You can also use Visual Studio Code or just an editor.
If you want to try it with an earlier version then its the command line compiler and a text editor for you or point your browser at the TypeScript Playground where you can try small chunks of code out.
As long as the TypeScript SDK and addin are install you should see a new project type HTML Application with TypeScript in the TypeScript section.
You can create Node.js TypeScript projects and ones that use Azure for deployment.
The idea is that when you build the project all .ts files are complied to .js files of the same name which you use in the HTML part of the project.
Three Key Language Ideas
There are three basic ways it does this.
Now lets take a closer look at each of the features.
Of the key ideas the module and the class are perhaps the simplest and hence least interesting but we need to know about them to describe the type system so let's begin with the module and then look at class.
If you are happy with the ideas of module and class simply jump to the section in the type system which is the real meat of TypeScript.
Anything that you don't export is private to the module and cannot be accessed by the external world.
|Last Updated ( Thursday, 12 April 2018 )|