1

I'm working on and Angular2 project using webpack. I'm having issues with Jasmine references and definitions, where Visual Studio Code complains about any Jasmine syntax (describe, it, beforeall and the rest of the lot). The same applies to the browser object.

I found another post mentioning the necessity of references, eg:

///<reference path="./../node_modules/@types/jasmine/index.d.ts"/>

this works perfectly fine if inserted at the very top of the specs, however, where and how should these references be placed to be available globally? I tried in the app.module.ts, but intellisense still complains.

Community
  • 1
  • 1
user2707674
  • 333
  • 1
  • 6
  • 14

1 Answers1

1

Please take a look at this question that was posted earlier.

This will help you solve all issues: Typescript 2.0. "types" field in tsconfig.json

Community
  • 1
  • 1
Vlad Jerca
  • 2,194
  • 1
  • 10
  • 5
  • unfortunately, that doesn't help. I already had all that configured. – user2707674 Oct 03 '16 at 12:59
  • 2
    do you have typescript 2 installed globally? try running **npm uninstall typescript -g** and then reinstall **npm i typescript@2.0.3 -g**. I've read that some conflicts can turn up when upgrading and VSCode is unable to interpret the new TS config. Also, please try to manually reference the tsdk in the vscode **settings.json** file like so: **"typescript.tsdk": "./node_modules/typescript/lib"** – Vlad Jerca Oct 03 '16 at 13:35
  • if the above recommendations do not work, it would be good if you share your configurations and everything :) – Vlad Jerca Oct 03 '16 at 14:43
  • that was a life saver!! :) I had the latest version of typescript referenced in packages.json and an older global version. – user2707674 Oct 03 '16 at 15:07
  • glad I could help :) – Vlad Jerca Oct 03 '16 at 16:09