-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypings.d.ts
145 lines (124 loc) · 2.79 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/// <reference types="zone.js" />
/// <reference types="meteor-typings" />
/// <reference types="@types/underscore" />
/// <reference types="@types/chai" />
/// <reference types="@types/mocha" />
/// <reference types="@types/node" />
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/tmeasday:publish-counts' {
import { Mongo } from 'meteor/mongo';
interface CountsObject {
get(publicationName: string): number;
publish(context: any, publicationName: string, cursor: Mongo.Cursor, options: any): number;
}
export const Counts: CountsObject;
}
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;
}
declare var Fake: {
sentence(words: number): string;
}
}