DefinitelyTyped/types/jasmine-given/index.d.ts
Dmitry A. Efimenko d1f694fa3a jasmine-given: make done arg non-optional (#35842)
* jasmine-given: make done arg non-optional

* simplify signature

* fix readability for authors

* clean up parentesis
2019-05-31 11:33:58 -07:00

22 lines
959 B
TypeScript

// Type definitions for jasmine-given 2.6
// Project: https://github.com/searls/jasmine-given
// Definitions by: Shai Reznik <https://github.com/shairez>
// Dmitry Efimenko <https://github.com/DmitryEfimenko>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/** Action method that should be called when the async work is complete */
interface DoneFn {
(): void;
/** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */
fail: (message?: Error | string) => void;
}
declare function Given(func: (done: DoneFn) => void): void;
declare function When(func: (done: DoneFn) => void): void;
declare function Then(func: (done: DoneFn) => void): void;
declare function Then(label: string, func: (done: DoneFn) => void): void;
declare function And(func: (done: DoneFn) => void): void;
declare function Invariant(func: (done: DoneFn) => void): void;