Last updated on September 2, 2022

VS Code 插件和配置

TypeScript Importer: 自动收集项目内所有的类型定义,按下 : 时提示这些类型进行补全并将类型导入进来

Move TS: 修改文件路径是,会自动帮你讲文件目录的导入并更新其他文件对于改文件的导入

ErrorLens(主理人使用): 错误提醒

配置

注意是 TypeScript 相关的 Hints

注意是 TypeScript 相关的 Hints

例如:

开启效果

Untitled

TS 文件执行 tsx(TypeScript Execut)

如果想要快速执行 TypeScript 文件,可以使用 tsx(https://github.com/esbuild-kit/tsx)

$ npx tsx ./script.ts
# or
$ pnpm dlx tsx ./script.ts

支持 tsconfig 配置、watch Mode 等等