Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install older version of Typescript?

I recently installed Typescript 1.8 and found too many breaking issues. So for the time being I would like to install 1.7. Where can I get a link to down this?

like image 887
AlvinfromDiaspar Avatar asked Jun 21 '16 00:06

AlvinfromDiaspar


People also ask

How do I specify TypeScript version?

Tip: To get a specific TypeScript version, specify @version during npm install. For example, for TypeScript 3.6. 0, you would use npm install --save-dev [email protected] . To preview the next version of TypeScript, run npm install --save-dev typescript@next .

How do I change the version of a TypeScript in global?

By default, it will install latest version. Or you can remove the orginal version, run yarn global remove typescript , and then execute yarn global add typescript , by default it will also install the latest version of typescript.

How do I install a specific version?

For npm install specific version, use npm install [package-name]@[version-number]. Use npm view [package-name] version to know the specific latest version of a package available on the npm registry. Use npm list [package-name] to know the specific latest version of an installed package.


2 Answers

For installing typescript 1.7.5, use

npm install [email protected] 
like image 178
Ajay Avatar answered Oct 13 '22 08:10

Ajay


to install globally npm install -g [email protected]

to check open cmd and run tsc -v

to install it for the specific project you are working on change to the directory of your project

npm install [email protected]

and then check your package.json file

If you are using visual studio 2017, it may be using visual studio's version of typescript.

like image 43
crh225 Avatar answered Oct 13 '22 08:10

crh225