Tsadvanced
Tsadvanced
A D V A N C E D
THIS BOOK
This book is written (typed) by
Ari, who hails from the South
and has keen interests in
Computer Science, Biology, and
Tamil Literature. Occasionally,
he updates his website, where
you can reach out to him.
https://arihara-sudhan.github.io
Kindly go through the following
book before reading this.book
TYPESCRIPT
TypeScript is described as a
“superset of JavaScript” or
“JavaScript with types.” It is four
things:
>> Programming Language
A language that includes all the
JavaScript syntax, plus new
TypeScript syntax for types.
>> Type Checker
A program that takes in a set of
files written in JavaScript and/or
TypeScript, develops an
understanding of all the
constructs created, and lets the
developer know if it thinks
anything is set up incorrectly.
>> Transpiler
A program that runs the type
checker, reports any issues,
then outputs the equivalent
JavaScript code.
>> Language service
A program that uses the type
checker to tell editors how to
provide helpful utilities to
developers.
EXAMPLES
When we code the following in
TypeScript (I am using
TypeScript playground),
On hovering,
If we want to perform or
simulate something called
Function Overloading in
JavaScript,
We may need to check
arguments.length and proceed
accordingly. But, here in
TypeScript, we can make it
easy!