DEV Community

bin
bin

Posted on

3-How to install TypeScript

make sure node is intalled on your computer.

mac@MacBook-Pro typescriptYoutube % node -v
v24.4.1
Enter fullscreen mode Exit fullscreen mode

check npm version

mac@MacBook-Pro typescriptYoutube % npm -v
11.4.2
Enter fullscreen mode Exit fullscreen mode

install typescript

mac@MacBook-Pro typescriptYoutube % npm install -g typescript

added 1 package in 3s
Enter fullscreen mode Exit fullscreen mode

check tsc version

mac@MacBook-Pro typescriptYoutube % tsc -v
Version 5.9.2
Enter fullscreen mode Exit fullscreen mode

then we create a ts file and excute tsc xx.ts to convert it to js file.

Top comments (0)