不同 NodeJS 版本应使用哪个 tsc --target?

根据你打算支持的最低 NodeJS 版本,你应该为 tsc 使用以下 –target 设置:

注意,为 NodeJS 编译时,除了 --target 之外还有更多可能的配置。查看 Github 上的 tsconfig 基础配置示例 了解更多详情。

*来源:*Github 上的 tsconfig bases


Check out similar posts by category: NodeJS, Typescript