Description
Updating the CLI to beta.2 and above at the moment requires typings for jasmine.
@hansl and I have been trying to add typings (#175), but at the moment there are some issues.
broccoli-typescript
seems to ignore type definitions so putting the typings directly on the src/
folder will not allow them to be compiled via ng serve
.
On the other hand, putting them outside the src/
folder and referencing them also seems to have problems. Using the following reference /// <reference path="../../typings/main/ambient/jasmine/jasmine.d.ts" />
on src/app/new-project.spec.ts
produces this error:
$ ng serve
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
[DiffingTSCompiler]: Typescript found the following errors:
app/testproj.spec.ts (1, 1): File '../typings/main/ambient/jasmine/jasmine.d.ts' not found.
app/testproj.spec.ts (10, 32): Property 'toBe' does not exist on type 'NgMatchers'.
app/testproj.spec.ts (15, 35): Property 'toBe' does not exist on type 'NgMatchers'.
app/testproj.spec.ts (16, 37): Property 'toBe' does not exist on type 'NgMatchers'.
node_modules/angular2/src/testing/matchers.d.ts (4, 37): Cannot find namespace 'jasmine'.
(notice that it is trying to fetch the typing from the wrong folder)
So at the moment, using typings seems to break ng serve
and without it we cannot upgrade to beta.2 and beyond.
/cc @IgorMinar