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 [email protected]1.6 index.ts npx typescript --target es2017 index.ts // Use the latest version
时间: 2024-10-07 14:02:13