I'm currently facing an issue while writing my first Angular unit test in TypeScript. I keep receiving the error TS2304: Cannot find name 'module'. If anyone has any insights or suggestions on how to resolve this, I would greatly appreciate it.
TS2304: Cannot find name 'module'.
Test Code:
/// <reference path="../typings/karma-jasmine/karma-jasmine.d.ts" />
/// <reference path="../typings/angularjs/angular-mocks.d.ts" />
describe("FooTest", () => {
beforeEach(module("app"));
});
I am utilizing TSD (TypeScript Definition manager) for managing my TypeScript definitions.
tsd.json
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"jquery/jquery.d.ts": {
"commit": "ef32bff4d15782dbbabf99ecb17ba22119cc2bd2"
},
"angularjs/angular.d.ts": {
"commit": "ef32bff4d15782dbbabf99ecb17ba22119cc2bd2"
},
"karma-jasmine/karma-jasmine.d.ts": {
"commit": "ef32bff4d15782dbbabf99ecb17ba22119cc2bd2"
},
"jasmine/jasmine.d.ts": {
"commit": "ef32bff4d15782dbbabf99ecb17ba22119cc2bd2"
},
"angularjs/angular-mocks.d.ts": {
"commit": "ef32bff4d15782dbbabf99ecb17ba22119cc2bd2"
}
}
}
I am using IntelliJ IDEA 14
Thank you, Stefan