The FASTEST way to create a TypeScript project

preview_player
Показать описание

*My FREE programming apps:*

*My FREE TypeScript Course:*

Timeline:
00:21 Create new project
00:38 Installing TypeScript
01:16 Configuring TypeScript
02:00 Write TypeScript Code
02:18 Compile TypeScript Code
02:53 Run TypeScript Code in Browser
03:44 TypeScript's Watch Mode
04:46 Common Mistakes

Commands:
1. npm init -y
2. npm i --D typescript
3. npx tsc --init
5. npx tsc

Resources:

Follow TypeScript TV:

Hashtags:
#TypeScript #JavaScript #CodeNewbie #Programming
Рекомендации по теме
Комментарии
Автор

For robust development purpose, make it run first, which is considered as my 1st priority. Then correct the types later.
So I always add 1 more package, either `ts-node` or `ts-node-dev` to bypass type-checking steps.
> ts-node --transpile-only <FILE>
---
I usually added 4 lines below to `package.json`
{
"dev": "ts-node --transpile-only index.ts", // Run immediately without depending on pre-compiled *.js file.
"build": "npm run clean && tsc --build", // Clean and re-build *.js based on `tsconfig.json`.
"clean": "tsc --build --clean", // Removing all *.js file, based on the `tsconfig.json` output path properties.
"tsc": "tsc --noEmit", // Checking @types only, not output *.js file.
}

minhthinhhuynhle
visit shbcf.ru