23prime / typescript-practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typescript-practice

Note of TypeScript.

Init

Install and pin tools and runtime by Volta

Make project directory and cd.

mkdir typescript-practice
cd typescript-practice/

Pin Node.js.

volta pin node@16.8.0

Pin yarn.

volta pin yarn@1.22.18

Pin npx.

volta pin npx@10.2.2

Init project

Init yarn project.

yarn init --yes

Add TypeScript dependencies.

yarn add --dev typescript @types/node

Init TypeScript project.

npx tsc --init

Exec

Compile.

yarn tsc

Run.

node dist/index.js

About


Languages

Language:TypeScript 100.0%