2016-04-11 7 views
5

Jestem nowym użytkownikiem TypeScript. Chcę zainstalować konkretną wersję pliku definicji kątowej do mojej aplikacji.Typy instalują określoną wersję plików definicji

Korzystanie TSD mogę użyć następującego polecenia

tsd install angular -v "1.4.0" -rso 

Ponieważ TSD jest przestarzała, mam przesunięty typings zautomatyzować instalację plików definicji.

Moje pytanie brzmi, korzystając z typings, czy mogę zainstalować konkretną wersję pliku definicji kątowej? Jeśli tak, to jaka jest komenda w typings?

Aktualizacja:

Próbowałem poniżej poleceń, ale nie działa.

typings install [email protected] 

i

typings install [email protected] --ambient 

komunikaty błędu wyglądać następująco:

$ 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> 
+0

Zgłoszone jako błąd https://github.com/typings/typings/issues/442 –

Odpowiedz

4

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] 

Oznacza to, że polecenie to powinno działać (trzeba także dodać --ambient Flaga, ponieważ i t nie jest przenoszony z DefinitelyTyped jeszcze):

typings install [email protected] --ambient 
+0

proszę zobaczyć zaktualizowaną pytanie. – imfarhad

+1

@imfarhad Hmm, rozumiem. Cóż, wygląda na to, że to błąd, zgłosiłbym to jako problem na GitHub. –

+0

Powiedziałbym, że problem dotyczy repozytorium DT dla typowania kątowego (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/angularjs). Wersja 1.4 znajduje się w folderze o nazwie * legacy *, typings prawdopodobnie nie potrafi go obsłużyć. – goenning

Powiązane problemy