-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
executable file
·129 lines (112 loc) · 2.39 KB
/
typings.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/// <reference types="zone.js" />
/// <reference types="@types/meteor" />
/// <reference types="@types/underscore" />
/// <reference types="@types/chai" />
/// <reference types="@types/mocha" />
declare module "*.html" {
const template: string;
export default template;
}
declare module "*.scss" {
const style: string;
export default style;
}
declare module "*.less" {
const style: string;
export default style;
}
declare module "*.css" {
const style: string;
export default style;
}
declare module "*.sass" {
const style: string;
export default style;
}
declare module "meteor/hwillson:stub-collections" {
import { Mongo } from "meteor/mongo";
interface IStubCollections {
stub(collection: Mongo.Collection);
restore();
}
const StubCollections: IStubCollections;
export default StubCollections;
}
declare module "chai-spies" {
const chaiSpies: (chai: any, utils: any) => void;
export = chaiSpies;
}
interface SpyCalledWith extends Chai.Assertion {
(...args: any[]): void;
exactly(...args: any[]): void;
}
interface SpyCalledAlways extends Chai.Assertion {
with: SpyCalledWith;
}
interface SpyCalledAt {
most(n: number): void;
least(n: number): void;
}
interface SpyCalled {
(n?: number): void;
/**
* Assert that a spy has been called exactly once
*
* @api public
*/
once: any;
/**
* Assert that a spy has been called exactly twice.
*
* @api public
*/
twice: any;
/**
* Assert that a spy has been called exactly `n` times.
*
* @param {Number} n times
* @api public
*/
exactly(n: number): void;
with: SpyCalledWith;
/**
* Assert that a spy has been called `n` or more times.
*
* @param {Number} n times
* @api public
*/
min(n: number): void;
/**
* Assert that a spy has been called `n` or fewer times.
*
* @param {Number} n times
* @api public
*/
max(n: number): void;
at: SpyCalledAt;
above(n: number): void;
/**
* Assert that a spy has been called more than `n` times.
*
* @param {Number} n times
* @api public
*/
gt(n: number): void;
below(n: number): void;
/**
* Assert that a spy has been called less than `n` times.
*
* @param {Number} n times
* @api public
*/
lt(n: number): void;
}
declare namespace Chai {
interface ChaiStatic {
spy(): any;
}
interface Assertion {
called: SpyCalled;
always: SpyCalledAlways;
}
}