visual studio code怎样编译typescript

2025-03-12 09:43:22
推荐回答(1个)
回答1:

TypeScript项目和tsconfig.json 首先安装TypeScript编译器 npm i -g typescript 进入项目目录,新建一个 hello.ts function sayHello(name: string) { return 'Hello, ' + name; } let myName = 'Cheng Wang'; console.log(sayHello(myName)); ...