forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchai-datetime.d.ts
39 lines (32 loc) · 1.37 KB
/
chai-datetime.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Type definitions for chai-datetime
// Project: https://github.com/gaslight/chai-datetime.git
// Definitions by: Cliff Burger <https://github.com/cliffburger/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../chai/chai.d.ts" />
declare module chai {
interface Expect {
afterDate(date: Date): boolean;
beforeDate(date: Date): boolean;
equalDate(date: Date): boolean;
afterTime(date: Date): boolean;
beforeTime(date: Date): boolean;
equalTime(date: Date): boolean;
}
interface Assert {
equalTime(val: Date, exp: Date, msg?: string): boolean;
notEqualTime(val: Date, exp: Date, msg?: string): boolean;
beforeTime(val: Date, exp: Date, msg?: string): boolean;
notBeforeTime(val: Date, exp: Date, msg?: string): boolean;
afterTime(val: Date, exp: Date, msg?: string): boolean;
notAfterTime(val: Date, exp: Date, msg?: string): boolean;
equalDate(val: Date, exp: Date, msg?: string): boolean;
notEqualDate(val: Date, exp: Date, msg?: string): boolean;
beforeDate(val: Date, exp: Date, msg?: string): boolean;
notBeforeDate(val: Date, exp: Date, msg?: string): boolean;
afterDate(val: Date, exp: Date, msg?: string): boolean;
notAfterDate(val: Date, exp: Date, msg?: string): boolean;
}
}
interface Date {
should: chai.Expect;
}