我正在使用this文档在Visual Studio代码编辑器中运行hello-world类型脚本程序。
我已经做了以下步骤
1.安装了TypeScript编译器tsc --版本显示Version 4.2.4
1.将TypeScript转换为JavaScript
当我尝试运行类型脚本构建时,通过执行运行构建任务(B),我看不到任何要构建的任务。
所以我在这一点上卡住了。有人能告诉我,如果我们需要手动创建这个任务?还是有一个先决条件,我错过了?
谢谢!
我正在使用this文档在Visual Studio代码编辑器中运行hello-world类型脚本程序。
我已经做了以下步骤
1.安装了TypeScript编译器tsc --版本显示Version 4.2.4
1.将TypeScript转换为JavaScript
当我尝试运行类型脚本构建时,通过执行运行构建任务(B),我看不到任何要构建的任务。
所以我在这一点上卡住了。有人能告诉我,如果我们需要手动创建这个任务?还是有一个先决条件,我错过了?
谢谢!
1条答案
按热度按时间0s0u357o1#
尝试重新启动VSCode。如果不起作用,请尝试通过以下方式配置任务:
Command palette (Ctrl+Shift+P / F1) > Tasks: Configure default build task
如果这不起作用,这里是默认的任务配置:
要检测到这些,请在工作区的根目录下创建一个
.vscode
文件夹,并在其中创建一个文件tasks.json
。如果您将上面的json放入其中,VSCode将找到您的任务。