如何使用 typings 安装 jquery

How to install jquery using typings

用过:

typings install jquery --global

typings ERR! message Unable to find "jquery" ("npm") in the registry. Did you want to try searching another source? Also, if you want contribute these typings, please help us: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/jquery/versions/latest responded with 404, expected it to equal 200

谁能帮帮我。

尝试:

typings install dt~jquery --global --save

编辑:

来自 https://github.com/typings/typings#updating-from-0x-to-10

If you want to install from DefinitelyTyped, be explicit (use dt~ --global). For example: typings install dt~angular-component-router --global --save

(另请参阅下面 Fidan Hakaj 的评论)

如果您使用 typescript2.0 和命令:

npm install -g typescript@2.0

您可以使用以下命令安装 jquery:

npm install --save @types/jquery