@@ -31,44 +31,44 @@ declare interface $npm$mocha$Suite {
31
31
fullTitle ( ) : string ;
32
32
}
33
33
34
- declare interface $npm$mocha$ContextDefinition {
34
+ declare type $npm$mocha$ContextDefinition = { |
35
35
(
36
36
description : string ,
37
37
callback : ( ) => /* this: $npm$mocha$SuiteCallbackContext */ void ,
38
- ) : $npm$mocha$Suite ;
38
+ ) : $npm$mocha$Suite ,
39
39
only (
40
40
description : string ,
41
41
callback : ( ) = > /* this: $npm$mocha$SuiteCallbackContext */ void ,
42
- ) : $npm$mocha$Suite ;
42
+ ) : $npm$mocha$Suite ,
43
43
skip (
44
44
description : string ,
45
- callbac : ( ) = > /* this: $npm$mocha$SuiteCallbackContext */ void ,
46
- ) : void ;
47
- timeout ( ms : number ) : void ;
48
- }
45
+ callback : ( ) = > /* this: $npm$mocha$SuiteCallbackContext */ void ,
46
+ ) : void ,
47
+ timeout ( ms : number ) : void ,
48
+ | } ;
49
49
50
- declare interface $npm$mocha$TestDefinition {
50
+ declare type $npm$mocha$TestDefinition = { |
51
51
(
52
52
expectation : string ,
53
53
callback ?: (
54
54
/* this: $npm$mocha$TestCallbackContext, */ done : $npm$mocha$done ,
55
55
) => mixed ,
56
- ) : $npm$mocha$Test ;
56
+ ) : $npm$mocha$Test ,
57
57
only (
58
58
expectation : string ,
59
59
callback ?: (
60
60
/* this: $npm$mocha$TestCallbackContext, */ done : $npm$mocha$done ,
61
61
) => mixed ,
62
- ) : $npm$mocha$Test ;
62
+ ) : $npm$mocha$Test ,
63
63
skip (
64
64
expectation : string ,
65
65
callback ?: (
66
66
/* this: $npm$mocha$TestCallbackContext, */ done : $npm$mocha$done ,
67
67
) => mixed ,
68
- ) : void ;
69
- timeout ( ms : number ) : void ;
70
- state : 'failed ' | 'passed' ;
71
- }
68
+ ) : void ,
69
+ timeout ( ms : number ) : void ,
70
+ state : 'failed' | 'passed' ,
71
+ | } ;
72
72
73
73
declare interface $npm$mocha$Runner { }
74
74
@@ -208,98 +208,109 @@ declare var xit: $npm$mocha$TestDefinition;
208
208
declare var test : $npm$mocha$TestDefinition ;
209
209
declare var specify : $npm$mocha$TestDefinition ;
210
210
211
- declare function run ( ) : void ;
211
+ type Run = ( ) => void ;
212
212
213
- declare function setup (
213
+ declare var run : Run ;
214
+
215
+ type Setup = (
214
216
callback : (
215
217
/* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
216
218
) = > mixed ,
217
- ) : void ;
218
- declare function teardown (
219
+ ) => void ;
220
+ type Teardown = (
219
221
callback : (
220
222
/* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
221
223
) = > mixed ,
222
- ) : void ;
223
- declare function suiteSetup (
224
+ ) => void ;
225
+ type SuiteSetup = (
224
226
callback : (
225
227
/* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
226
228
) = > mixed ,
227
- ) : void ;
228
- declare function suiteTeardown (
229
+ ) => void ;
230
+ type SuiteTeardown = (
229
231
callback : (
230
232
/* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
231
233
) = > mixed ,
232
- ) : void ;
233
- declare function before (
234
+ ) => void ;
235
+ type Before = (
234
236
callback : (
235
237
/* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
236
238
) = > mixed ,
237
- ) : void ;
238
- declare function before (
239
- description : string ,
239
+ ) =>
240
+ | void
241
+ | ( (
242
+ description : string ,
243
+ callback : (
244
+ /* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
245
+ ) => mixed ,
246
+ ) => void ) ;
247
+ type After = (
240
248
callback : (
241
249
/* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
242
250
) = > mixed ,
243
- ) : void ;
244
- declare function after (
245
- callback : (
246
- /* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
247
- ) = > mixed ,
248
- ) : void ;
249
- declare function after (
250
- description : string ,
251
- callback : (
252
- /* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
253
- ) = > mixed ,
254
- ) : void ;
255
- declare function beforeEach (
256
- callback : (
257
- /* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
258
- ) = > mixed ,
259
- ) : void ;
260
- declare function beforeEach (
261
- description : string ,
251
+ ) =>
252
+ | void
253
+ | ( (
254
+ description : string ,
255
+ callback : (
256
+ /* this: $npm$mocha$HookCallbackContext, */ done : $npm$mocha$done ,
257
+ ) => mixed ,
258
+ ) => void ) ;
259
+ type BeforeEach = (
262
260
callback : (
263
261
/* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
264
262
) = > mixed ,
265
- ) : void ;
266
- declare function afterEach (
263
+ ) =>
264
+ | void
265
+ | ( (
266
+ description : string ,
267
+ callback : (
268
+ /* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
269
+ ) => mixed ,
270
+ ) => void ) ;
271
+ type AfterEach = (
267
272
callback : (
268
273
/* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
269
274
) = > mixed ,
270
- ) : void ;
271
- declare function afterEach (
272
- description : string ,
273
- callback : (
274
- /* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
275
- ) = > mixed ,
276
- ) : void ;
275
+ ) =>
276
+ | void
277
+ | ( (
278
+ description : string ,
279
+ callback : (
280
+ /* this: $npm$mocha$BeforeAndAfterContext, */ done : $npm$mocha$done ,
281
+ ) => mixed ,
282
+ ) => void ) ;
283
+
284
+ declare var setup : Setup ;
285
+ declare var teardown : Teardown ;
286
+ declare var suiteSetup : SuiteSetup ;
287
+ declare var suiteTeardown ;
288
+ declare var before : Before ;
289
+ declare var after : After ;
290
+ declare var beforeEach : BeforeEach ;
291
+ declare var afterEach : AfterEach ;
277
292
278
293
declare module 'mocha' {
279
- declare export var mocha : typeof mocha ;
280
- declare export var describe : typeof describe ;
281
- declare export var xdescribe : typeof xdescribe ;
282
- declare export var context : typeof context ;
283
- declare export var suite : typeof suite ;
284
- declare export var it : typeof it ;
285
- declare export var xit : typeof xit ;
286
- declare export var test : typeof test ;
287
- declare export var specify : typeof specify ;
294
+ declare export var mocha : $npm$ mocha$TestDefinition ;
295
+ declare export var describe : $npm$mocha$ContextDefinition ;
296
+ declare export var xdescribe : $npm$mocha$ContextDefinition ;
297
+ declare export var context : $npm$mocha$ContextDefinition ;
298
+ declare export var suite : $npm$mocha$ContextDefinition ;
299
+ declare export var it : $npm$mocha$TestDefinition ;
300
+ declare export var xit : $npm$mocha$TestDefinition ;
301
+ declare export var test : $npm$mocha$TestDefinition ;
302
+ declare export var specify : $npm$mocha$TestDefinition ;
288
303
289
- declare export var run : typeof run ;
304
+ declare export var run : Run ;
290
305
291
- declare export var setup : typeof setup ;
292
- declare export var teardown : typeof teardown ;
293
- declare export var suiteSetup : typeof suiteSetup ;
294
- declare export var suiteTeardown : typeof suiteTeardown ;
295
- declare export var before : typeof before ;
296
- declare export var before : typeof before ;
297
- declare export var after : typeof after ;
298
- declare export var after : typeof after ;
299
- declare export var beforeEach : typeof beforeEach ;
300
- declare export var beforeEach : typeof beforeEach ;
301
- declare export var afterEach : typeof afterEach ;
302
- declare export var afterEach : typeof afterEach ;
306
+ declare export var setup : Setup ;
307
+ declare export var teardown : Teardown ;
308
+ declare export var suiteSetup : SuiteSetup ;
309
+ declare export var suiteTeardown : SuiteTeardown ;
310
+ declare export var before : Before ;
311
+ declare export var after : After ;
312
+ declare export var beforeEach : BeforeEach ;
313
+ declare export var afterEach : AfterEach ;
303
314
304
315
declare export default $npm$mocha$Mocha ;
305
316
}
0 commit comments