Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find previous version of NPM @types

I am using Angular 1.4.7 and I am trying to find a type file for this version.

On the NPM site I have searched for AngularJs and found version 1.5.14 alpha. How can I get a list of all versions published to @types/npm?

like image 396
Martin Andersen Avatar asked Oct 25 '16 07:10

Martin Andersen


People also ask

What does @types mean npm?

Summary: The @types npm organization is for obtaining type definitions with npm . Using these type definitions is a feature is coming in TypeScript 2.0. This will replace the current projects/tools such as typings and tsd, though these will continue to be supported for some time.

How do I use a specific version of npm?

Use npm install [package-name]@[version-number] to install an older version of a package. Prefix a version number with a caret (^) or a tilde (~) to specify to install the latest minor or patch version, respectively.

How do I check my npm version?

To see the most current version of a package in the npm repository, use the npm view npm get version of package-name version command.


1 Answers

If you run:

$ npm info @types/angular

{ name: '@types/angular',
  description: 'TypeScript definitions for Angular JS 1.5',
  'dist-tags': { latest: '1.5.16' },
  versions: 
   [ '1.5.1-alpha',
     '1.5.2-alpha',
     '1.5.3-alpha',
     '1.5.4-alpha',
     '1.5.5-alpha',
     '1.5.6-alpha',
     '1.5.7',
     '1.5.8',
     '1.5.9',
     '1.5.10',
     ...

you'll see list of all available versions for this package. For angular the oldest is 1.5.1-alpha so you probably have to install typings from a different source with typings tool.

like image 175
martin Avatar answered Dec 03 '22 02:12

martin