Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typings install specific version of definition files

I am new to TypeScript. I want to install a specific version of angular definition file to my application.

Using TSD i can use the following command

tsd install angular -v "1.4.0" -rso

Since, TSD is deprecated, i have shifted to typings to automate the definition files installation.

My question is, using typings, can i install a particular version of angular definition file? If so then what's the command in typings?

Update:

I tried below commands but they didn't work.

typings install [email protected]

and

typings install [email protected] --ambient

The error messages look like:

$ typings install [email protected] --ambient
typings ERR! message Unable to find "angular" for "dt" in the registry. Did you want to install ambient typings with the ambient flag? If you can contribute these typings, please help us: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/dt/angular/versions/1.4.0/latest responded with 404, expected it to equal 200

typings ERR! cwd /Users/idolezalova/projects/wfm
typings ERR! system Darwin 15.4.0
typings ERR! command "/Users/idolezalova/.nvm/versions/node/v4.3.1/bin/node" "/Users/idolezalova/.nvm/versions/node/v4.3.1/bin/typings" "install" "[email protected]" "--ambient"
typings ERR! node -v v4.3.1
typings ERR! typings -v 0.7.12

typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>
like image 921
imfarhad Avatar asked Apr 11 '16 13:04

imfarhad


1 Answers

From help:

$ typings install -h

typings install (with no arguments, in package directory)
typings install <pkg>[@<version>] [ --source [dt | npm | github | bower | common | shared | lib | env | global] ]
typings install file:<path>
typings install github:<github username>/<github project>[/<path>][#<commit>]
typings install bitbucket:<bitbucket username>/<bitbucket project>[/<path>][#<commit>]
typings install <http:// url>

Aliases: i, in
Options: [--name] [--save|--save-dev] [--ambient] [--production]

That means this command should work (you also need to add --ambient flag because it is not ported from DefinitelyTyped yet):

typings install [email protected] --ambient
like image 190
Knut Holm Avatar answered Nov 12 '22 01:11

Knut Holm