我在我的项目中安装了茉莉花的打字。这些现在位于我的" index.d.ts"文件。但是在编写测试expect('').toBeNaN
时,我只会显示" toBe",仅此而已。
这些是我的配置文件:
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"filesGlob": [
"**/*.ts",
"!node_modules/**/*"
],
"include": [
"typings/index.d.ts"
],
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
这是我的 index.d.ts
/// <reference path="globals/jasmine-expect/index.d.ts" />
/// <reference path="globals/jasmine/index.d.ts" />
/// <reference path="globals/karma-jasmine/index.d.ts" />