Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
public:computer:typescript [2021/12/23 10:51] – alex | public:computer:typescript [2022/09/11 21:06] – alex | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== TypeScript ====== | ====== TypeScript ====== | ||
+ | |||
+ | |||
+ | ===== Quick Start ===== | ||
+ | |||
+ | <cli prompt=" | ||
+ | $ npm init -y # create package.json in node.js project | ||
+ | $ npm install typescript --save-dev | ||
+ | $ npm install @types/node --save-dev | ||
+ | $ npx tsc --init --rootDir src --outDir lib --esModuleInterop --resolveJsonModule --lib es6,dom --module commonjs | ||
+ | $ npm install ts-node --save-dev | ||
+ | $ npm install nodemon --save-dev | ||
+ | </ | ||
+ | |||
+ | <code json> | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | </ | ||
+ | |||
+ | <cli prompt=" | ||
+ | $ npm start | ||
+ | </ | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
===== Setup ===== | ===== Setup ===== |