WindowsTypeScripts installation and configuration detailed tutorial

insert image description here

install command

npm i -g typescript

Verify that the installation was successful

tsc -v

TypeScript run

1. Create a file with a suffix of .ts, such as test.ts, and enter the following content in the file:

console.log('hello typescript!')
  1. Open a console and type:
ts-node test.ts //会返回hello typescript!

Guess you like

Origin blog.csdn.net/weixin_45428910/article/details/131546701