/typescript_001

introduction_to_typescript

Primary LanguageJavaScript

Good to Know

TypeScript cannot be run by the broswer/ node directly. It must be complied to JavaScript.

It must be complied, by running the tsc command.
I can direct where the OutPut of my JavaScript goes through tsconfig.

Angular comes configured with some default typescript settings.

TypeScript Refresher

(a)Installing commands globally:
sudo npm install -g typescript

(b)Initializing a TypeScript Configuration:
tsc --init

Typescript code is compiled to JavaScript
Must Remember.

Once i type tsc, it compiled my code to javascript.

TypeScipt Basics

(a)Type Inference -->Typescipt can determine the dattype dymanically based
on the data value provided.

It is better to be strict and determine the types before Hand.


Notes By

MbuguaCaleb