> For the complete documentation index, see [llms.txt](https://justin-se.gitbook.io/justin-se-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://justin-se.gitbook.io/justin-se-docs/javascript/typescript.md).

# TypeScript

## TypeScript (TS)

[TypeScript](https://www.typescriptlang.org/) is a [SuperSet](https://en.wikipedia.org/wiki/Subset) of Javascript,\
or you can call it "Javascript with [Static Type](https://en.wikipedia.org/wiki/Type_system#Type_checking)".

typescript are like signboard on road, it tell what it is, where it go,\
but you can still drive without signboard.

## **Why TS?**

* easier to read, good for working with team & others.
* spot error earlier and easier while develop or compiling.

## How to Implement

* [TS-Node](https://www.npmjs.com/package/ts-node)\
  it is a runtime compiler for node,\
  it can make typescript run like javascript in node environment,\
  but most of the time we only use it on development,\
  running js still have better performance than ts.
* [TSC](https://www.npmjs.com/package/tsc)\
  Type Script Compiler,\
  it compile TS to JS to have better performance for production.
