|
|
|
|
|
by paulddraper
2403 days ago
|
|
The TypeScript is usually install via npm, but like many package managers it doesn't allow multiple user-specific installed versions of a package. (What package manager allows for your multiple rustc versions? Or is it a bespoke solution?) Fortunately the (IMO superior) yarn package manager does. "devDependencies": {
"typescript": "~3.6.0",
"typescript-beta": "npm:typescript@3.7.0-beta"
}
Instead of using node_modules/.bin/tsc, use node_modules/typescript-beta/bin/tsc |
|
rustup, the recommended / website default way of installing rustc, supports installing multiple channels. The command it installs on your path as "rustc" (and "cargo" etc.) is actually a wrapper; you can use e.g. "rustc +nighly foo.rs", change the default for your user, and even change the default for a directory.
That said, CI is typicality done in ad-hoc VMs or containers (e.g., a Travis matrix), so having different versions in automated test runs would be straightforward even if rustup didn't support this.