After migrating to the latest version of Angular 2.0 and utilizing angular-cli and webpack for our application build process, we encountered an issue with automatic compilation in Webstorm. While running commands like ng test or build worked fine, webstorm's automatic compilation resulted in numerous errors. Previously, we had a main.ts file that referenced other d.ts files, which was smoothly integrated using tsconfig.json.
describe("it is a suite",()=>{
it("it is a test",()=>{
expect(1).toBe(2);
})
});
Adding a reference to jasmine.d.ts in the test file resolved the static compilation error. On the other hand, importing from '@angular/core/testing' raised issues regarding missing exported members.
The question now arises - Where and how should we include the type definition file to prevent these static compilation errors?
In my Webstorm settings, I have opted for the bundled (1.8.10) version with the TypeScript compiler enabled, utilizing tsconfig.json for configuration.
The tsconfig.json file includes content from the angular-cli project here, with additional entries in the files section to encompass main.ts and typings.d.ts.
typings.d.ts contains no information, while main.ts references other d.ts files located under the 'typings' folder at the root level.