“npm install --save @ types / jasmine”在哪里安装TypeScript声明文件?

时间:2018-01-23 20:07:48

标签: typescript npm

我运行suite spec/app_spec.lua files/app.lua:3: module 'resty.http' not found:No LuaRocks module found for resty.http ,现在我的npm install --save @types/jasmine / describe / it调用全部编译。但是,我找不到存储声明的位置,并且尝试在其他声明中引用Jasmine类型也会失败。

expect

...但没有TypeScript声明。

1 个答案:

答案 0 :(得分:1)

评论是正确的。 Jasmine的声明文件将在node_modules/@types/jasmine/index.d.ts中。要在声明文件中引用它,您只需执行以下操作:

/// <reference types="jasmine" />

declare function blah(): jasmine.CustomMatcher;
相关问题