zl程序教程

您现在的位置是:首页 >  前端

当前栏目

[Node] Run Any Version of a Node Tool with npx

Node of with version run TOOL any
2023-09-14 08:59:18 时间

As node projects evolve, new features are added all the time. This results in different errors or results as you're migrating from one version to another. npx allows you to try out any version you want by simply adding the version number to the project you're using. This lesson covers using the TypeScript compiler through a different versions as async function support was added.

 

Install:

npm install -g npx

 

Usage:

npx typescript@1.6 index.ts
npx typescript --target es2017 index.ts // Use the latest version