TypeScript
is an open-source 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 development of large applications and transcompiles to JavaScript and This is a very simple example how to write a Class
with interface
in typescript.
to getting start using typescript you have to install nodejs
on your computer.
nodejs installation coming with package manager
called npm
.
by using npm, now you can install typescript
into your komputer by typing :
npm install -g typescript
after successfully installed the typescript, you can start with command tsc --init
and it would be create tsconfig.json
file on your root folder of your application.
tsconfig.json
file actually is a configuration file that you can use to Transpile TypeScript into JavaScript
.
for example you can setup the output to es5
or es6
so the browser can execute the code.
to run the typescript, just typing tsc
command followed by tsc file
This Documentation will update continue...