Explicit interface for nothing()

This commit is contained in:
Mitya Kononchuk
2017-11-14 19:57:51 +01:00
parent 9f33e8c468
commit 66d4e5113f
+5 -2
View File
@@ -93,7 +93,7 @@ declare function expect<T>(actual: T): jasmine.Matchers<T>;
/**
* Create an expectation for a spec.
*/
declare function expect(): jasmine.Matchers<undefined>;
declare function expect(): jasmine.NothingMatcher;
/**
* Explicitly mark a spec as failed.
@@ -446,7 +446,6 @@ declare namespace jasmine {
toThrow(expected?: any): boolean;
toThrowError(message?: string | RegExp): boolean;
toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean;
nothing(): Any;
not: Matchers<T>;
@@ -460,6 +459,10 @@ declare namespace jasmine {
not: ArrayLikeMatchers<T>;
}
interface NothingMatcher {
nothing(): void;
}
interface Reporter {
reportRunnerStarting(runner: Runner): void;
reportRunnerResults(runner: Runner): void;