TIL. 155 타입스크립트(typescript) 설치 및 실행

조윤식·2022년 9월 19일
0

1. typescript 설치

npm i typescript

2. ts-node 설치

npm i ts-node --sava-dev

3. 컴파일 후 node로 실행

npx tsc

이제 node 명령을 통해 컴파일된 js파일을 실행합니다.

node dist/index.js

4. ts-node로 바로 실행

아까 설치한 ts-node를 이용해 바로 실행할 수 있습니다.

npx ts-node src/index.ts

profile
Slow and steady wins the race

0개의 댓글