@types/jasmine package and had problems.When trying to use Jasmine types definition in awesome-typescript-loader for webpack i'm getting the following error
[at-loader] ./node_modules/@types/jasmine/index.d.ts:314:15
TS2428: All declarations of 'Matchers' must have identical type parameters.
FIXED:
So angular documentation tells you to use a helper method for testing:
declare namespace jasmine {
interface Matchers {
toHaveText(actual: any, expectationFailOutput?: any): jasmine.CustomMatcher;
}
}
Since Matchers now strongly types it needed to be changed to
Hi Jordan ,
Above soln did not work for me.Could u please elaborate what i need to change in Matchers Interface?
@manindersoprasteria You need to update your
declare namespace jasmine {
interface Matchers {
...
to
declare namespace jasmine {
interface Matchers<T> {
...
@manindersoprasteria you'll also need @types/jasmine version that has that change for the Matchers interface (e.g. =< 2.6)
Most helpful comment
@manindersoprasteria You need to update your
to