typescript - cum instalez un typings listat?
Folosesc o bibliotecă cu Typescript și primesc o eroare de compilare.
public/components/chatlogs.ts(25,19): eroare TS2304: Nu se poate găsi numele 'Handsontable'.
se pare că există un typings pentru asta:
typings search handsontable
Viewing 2 of 2
NAME SOURCE HOMEPAGE DESCRIPTION UPDATED
handsontable dt https://handsontable.com/ 2016-04-12T15:30:16.000Z
jquery-handsontable dt http://handsontable.com 2016-03-29T17:54:46.000Z
dar atunci nu îl pot instala?
typings install handsontable
typings ERR! message Unable to find "handsontable" for "npm" 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/npm/handsontable/versions/latest responded with 404, expected it to equal 200
typings ERR! cwd /Users/dc/dev/rikai/boteditor
typings ERR! system Darwin 15.3.0
typings ERR! command "/usr/local/bin/iojs" "/usr/local/bin/typings" "install" "handsontable"
typings ERR! node -v v5.1.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>
➜ boteditor git:(master) ✗
Există vreo modalitate de a folosi un „sursă” diferit de npm?
typings help install
Usage: typings <command>
Commands:
bundle, i, in, info, init, install, la, list, ll, ls, open, r, remove, rm,
search, uninstall, view
typings <command> -h Get help for <command>
typings <command> -V Enable verbose logging
typings --version Print the CLI version
[email /usr/local/lib/node_modules/typings
Cum să instalez un typings care este listat cu o pagină principală diferită?
Sau poate există pentru tsd, dar nu pentru typings?
Răspuns #1
Cred că global a înlocuit ambient ca și cuvânt cheie, iar source~nume_pachet este sintaxa, de exemplu:
typings install dt~node --global
Încă nu este clar care sunt distincțiile dintre depozitele de tipuri env sau dt. Cu siguranță dt este locul implicit căutat, așa că de ce este nevoie să-l specifici?
