我运行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声明。
答案 0 :(得分:1)
评论是正确的。 Jasmine的声明文件将在node_modules/@types/jasmine/index.d.ts
中。要在声明文件中引用它,您只需执行以下操作:
/// <reference types="jasmine" />
declare function blah(): jasmine.CustomMatcher;