tsd install jquery --save 在 运行 时不安装

tsd install jquery --save Doesn't Install When Run

我刚开始学习 TypeScript,我正在做一个需要我 运行 tsd install jquery --save 的项目。当我 运行 该命令时,我收到一条错误消息 "The type definition index.d.ts does not exist. Create one and try again."

我用谷歌搜索了错误,发现命令已更新为 typings 而不是 tsd。但是不确定这是否正确。

然后我尝试了 运行ning typings install jquery --save 但这也没有用。

感谢任何帮助!谢谢!

tsd 实用程序已弃用,但您可以使用 NPM 直接安装类型。

Definitely Typed 的所有官方类型都可以在 @types 组织中找到。

npm install --save @types/jquery

有个type search available on Definitely Typed.