1 | declare module "bottleneck" {
|
2 | namespace Bottleneck {
|
3 | type ConstructorOptions = {
|
4 | |
5 |
|
6 |
|
7 | readonly maxConcurrent?: number | null;
|
8 | |
9 |
|
10 |
|
11 | readonly minTime?: number | null;
|
12 | |
13 |
|
14 |
|
15 | readonly highWater?: number | null;
|
16 | |
17 |
|
18 |
|
19 | readonly strategy?: Bottleneck.Strategy | null;
|
20 | |
21 |
|
22 |
|
23 | readonly penalty?: number | null;
|
24 | |
25 |
|
26 |
|
27 | readonly reservoir?: number | null;
|
28 | |
29 |
|
30 |
|
31 | readonly reservoirRefreshInterval?: number | null;
|
32 | |
33 |
|
34 |
|
35 | readonly reservoirRefreshAmount?: number | null;
|
36 | |
37 |
|
38 |
|
39 | readonly reservoirIncreaseAmount?: number | null;
|
40 | |
41 |
|
42 |
|
43 | readonly reservoirIncreaseInterval?: number | null;
|
44 | |
45 |
|
46 |
|
47 | readonly reservoirIncreaseMaximum?: number | null;
|
48 | |
49 |
|
50 |
|
51 | readonly id?: string | null;
|
52 | |
53 |
|
54 |
|
55 | readonly rejectOnDrop?: boolean | null;
|
56 | |
57 |
|
58 |
|
59 | readonly trackDoneStatus?: boolean | null;
|
60 | |
61 |
|
62 |
|
63 | readonly datastore?: string | null;
|
64 | |
65 |
|
66 |
|
67 | readonly Promise?: any;
|
68 | |
69 |
|
70 |
|
71 | readonly clientOptions?: any;
|
72 | |
73 |
|
74 |
|
75 | readonly clusterNodes?: any;
|
76 | |
77 |
|
78 |
|
79 |
|
80 | readonly connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection | null;
|
81 | |
82 |
|
83 |
|
84 | readonly clearDatastore?: boolean | null;
|
85 | |
86 |
|
87 |
|
88 | readonly timeout?: number | null;
|
89 |
|
90 | [propName: string]: any;
|
91 | };
|
92 | type JobOptions = {
|
93 | |
94 |
|
95 |
|
96 | readonly priority?: number | null;
|
97 | |
98 |
|
99 |
|
100 | readonly weight?: number | null;
|
101 | |
102 |
|
103 |
|
104 | readonly expiration?: number | null;
|
105 | |
106 |
|
107 |
|
108 | readonly id?: string | null;
|
109 | };
|
110 | type StopOptions = {
|
111 | |
112 |
|
113 |
|
114 | readonly dropWaitingJobs?: boolean | null;
|
115 | |
116 |
|
117 |
|
118 | readonly dropErrorMessage?: string | null;
|
119 | |
120 |
|
121 |
|
122 | readonly enqueueErrorMessage?: string | null;
|
123 | };
|
124 | type Callback<T> = (err: any, result: T) => void;
|
125 | type ClientsList = { client?: any; subscriber?: any };
|
126 | type GroupLimiterPair = { key: string; limiter: Bottleneck };
|
127 | interface Strategy {}
|
128 |
|
129 | type EventInfo = {
|
130 | readonly args: any[];
|
131 | readonly options: {
|
132 | readonly id: string;
|
133 | readonly priority: number;
|
134 | readonly weight: number;
|
135 | readonly expiration?: number;
|
136 | };
|
137 | };
|
138 | type EventInfoDropped = EventInfo & {
|
139 | readonly task: Function;
|
140 | readonly promise: Promise<any>;
|
141 | };
|
142 | type EventInfoQueued = EventInfo & {
|
143 | readonly reachedHWM: boolean;
|
144 | readonly blocked: boolean;
|
145 | };
|
146 | type EventInfoRetryable = EventInfo & { readonly retryCount: number; };
|
147 |
|
148 | enum Status {
|
149 | RECEIVED = "RECEIVED",
|
150 | QUEUED = "QUEUED",
|
151 | RUNNING = "RUNNING",
|
152 | EXECUTING = "EXECUTING",
|
153 | DONE = "DONE"
|
154 | }
|
155 | type Counts = {
|
156 | RECEIVED: number,
|
157 | QUEUED: number,
|
158 | RUNNING: number,
|
159 | EXECUTING: number,
|
160 | DONE?: number
|
161 | };
|
162 |
|
163 | type RedisConnectionOptions = {
|
164 | |
165 |
|
166 |
|
167 | readonly clientOptions?: any;
|
168 | |
169 |
|
170 |
|
171 | readonly client?: any;
|
172 | };
|
173 |
|
174 | type IORedisConnectionOptions = {
|
175 | |
176 |
|
177 |
|
178 | readonly clientOptions?: any;
|
179 | |
180 |
|
181 |
|
182 | readonly clusterNodes?: any;
|
183 | |
184 |
|
185 |
|
186 | readonly client?: any;
|
187 | };
|
188 |
|
189 | type BatcherOptions = {
|
190 | |
191 |
|
192 |
|
193 | readonly maxTime?: number | null;
|
194 | |
195 |
|
196 |
|
197 | readonly maxSize?: number | null;
|
198 | };
|
199 |
|
200 | class BottleneckError extends Error {
|
201 | }
|
202 |
|
203 | class RedisConnection {
|
204 | constructor(options?: Bottleneck.RedisConnectionOptions);
|
205 |
|
206 | /**
|
207 | * Register an event listener.
|
208 | * @param name - The event name.
|
209 | * @param fn - The callback function.
|
210 | */
|
211 | on(name: "error", fn: (error: any) => void): void;
|
212 |
|
213 | /**
|
214 | * Register an event listener for one event only.
|
215 | * @param name - The event name.
|
216 | * @param fn - The callback function.
|
217 | */
|
218 | once(name: "error", fn: (error: any) => void): void;
|
219 |
|
220 | /**
|
221 | * Waits until the connection is ready and returns the raw Node_Redis clients.
|
222 | */
|
223 | ready(): Promise<ClientsList>;
|
224 |
|
225 | /**
|
226 | * Close the redis clients.
|
227 | * @param flush - Write transient data before closing.
|
228 | */
|
229 | disconnect(flush?: boolean): Promise<void>;
|
230 | }
|
231 |
|
232 | class IORedisConnection {
|
233 | constructor(options?: Bottleneck.IORedisConnectionOptions);
|
234 |
|
235 | /**
|
236 | * Register an event listener.
|
237 | * @param name - The event name.
|
238 | * @param fn - The callback function.
|
239 | */
|
240 | on(name: "error", fn: (error: any) => void): void;
|
241 |
|
242 | /**
|
243 | * Register an event listener for one event only.
|
244 | * @param name - The event name.
|
245 | * @param fn - The callback function.
|
246 | */
|
247 | once(name: "error", fn: (error: any) => void): void;
|
248 |
|
249 | /**
|
250 | * Waits until the connection is ready and returns the raw ioredis clients.
|
251 | */
|
252 | ready(): Promise<ClientsList>;
|
253 |
|
254 | /**
|
255 | * Close the redis clients.
|
256 | * @param flush - Write transient data before closing.
|
257 | */
|
258 | disconnect(flush?: boolean): Promise<void>;
|
259 | }
|
260 |
|
261 | class Batcher {
|
262 | constructor(options?: Bottleneck.BatcherOptions);
|
263 |
|
264 | /**
|
265 | * Register an event listener.
|
266 | * @param name - The event name.
|
267 | * @param fn - The callback function.
|
268 | */
|
269 | on(name: string, fn: Function): void;
|
270 | on(name: "error", fn: (error: any) => void): void;
|
271 | on(name: "batch", fn: (batch: any[]) => void): void;
|
272 |
|
273 | /**
|
274 | * Register an event listener for one event only.
|
275 | * @param name - The event name.
|
276 | * @param fn - The callback function.
|
277 | */
|
278 | once(name: string, fn: Function): void;
|
279 | once(name: "error", fn: (error: any) => void): void;
|
280 | once(name: "batch", fn: (batch: any[]) => void): void;
|
281 |
|
282 | /**
|
283 | * Add a request to the Batcher. Batches are flushed to the "batch" event.
|
284 | */
|
285 | add(data: any): Promise<void>;
|
286 | }
|
287 |
|
288 | class Group {
|
289 | constructor(options?: Bottleneck.ConstructorOptions);
|
290 |
|
291 | id: string;
|
292 | datastore: string;
|
293 | connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection;
|
294 |
|
295 | /**
|
296 | * Returns the limiter for the specified key.
|
297 | * @param str - The limiter key.
|
298 | */
|
299 | key(str: string): Bottleneck;
|
300 |
|
301 | /**
|
302 | * Register an event listener.
|
303 | * @param name - The event name.
|
304 | * @param fn - The callback function.
|
305 | */
|
306 | on(name: string, fn: Function): void;
|
307 | on(name: "error", fn: (error: any) => void): void;
|
308 | on(name: "created", fn: (limiter: Bottleneck, key: string) => void): void;
|
309 |
|
310 | /**
|
311 | * Register an event listener for one event only.
|
312 | * @param name - The event name.
|
313 | * @param fn - The callback function.
|
314 | */
|
315 | once(name: string, fn: Function): void;
|
316 | once(name: "error", fn: (error: any) => void): void;
|
317 | once(name: "created", fn: (limiter: Bottleneck, key: string) => void): void;
|
318 |
|
319 | /**
|
320 | * Removes all registered event listeners.
|
321 | * @param name - The optional event name to remove listeners from.
|
322 | */
|
323 | removeAllListeners(name?: string): void;
|
324 |
|
325 | /**
|
326 | * Updates the group settings.
|
327 | * @param options - The new settings.
|
328 | */
|
329 | updateSettings(options: Bottleneck.ConstructorOptions): void;
|
330 |
|
331 | /**
|
332 | * Deletes the limiter for the given key.
|
333 | * Returns true if a key was deleted.
|
334 | * @param str - The key
|
335 | */
|
336 | deleteKey(str: string): Promise<boolean>;
|
337 |
|
338 | /**
|
339 | * Disconnects the underlying redis clients, unless the Group was created with the `connection` option.
|
340 | * @param flush - Write transient data before closing.
|
341 | */
|
342 | disconnect(flush?: boolean): Promise<void>;
|
343 |
|
344 | /**
|
345 | * Returns all the key-limiter pairs.
|
346 | */
|
347 | limiters(): Bottleneck.GroupLimiterPair[];
|
348 |
|
349 | /**
|
350 | * Returns all Group keys in the local instance
|
351 | */
|
352 | keys(): string[];
|
353 |
|
354 | /**
|
355 | * Returns all Group keys in the Cluster
|
356 | */
|
357 | clusterKeys(): Promise<string[]>;
|
358 | }
|
359 |
|
360 | class Events {
|
361 | constructor(object: Object);
|
362 |
|
363 | /**
|
364 | * Returns the number of limiters for the event name
|
365 | * @param name - The event name.
|
366 | */
|
367 | listenerCount(name: string): number;
|
368 |
|
369 | /**
|
370 | * Returns a promise with the first non-null/non-undefined result from a listener
|
371 | * @param name - The event name.
|
372 | * @param args - The arguments to pass to the event listeners.
|
373 | */
|
374 | trigger(name: string, ...args: any[]): Promise<any>;
|
375 | }
|
376 | }
|
377 |
|
378 | class Bottleneck {
|
379 | public static readonly strategy: {
|
380 | |
381 |
|
382 |
|
383 | readonly LEAK: Bottleneck.Strategy;
|
384 | |
385 |
|
386 |
|
387 | readonly OVERFLOW_PRIORITY: Bottleneck.Strategy;
|
388 | |
389 |
|
390 |
|
391 | readonly OVERFLOW: Bottleneck.Strategy;
|
392 | |
393 |
|
394 |
|
395 | readonly BLOCK: Bottleneck.Strategy;
|
396 | };
|
397 |
|
398 | constructor(options?: Bottleneck.ConstructorOptions);
|
399 |
|
400 | id: string;
|
401 | datastore: string;
|
402 | connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection;
|
403 |
|
404 | /**
|
405 | * Returns a promise which will be resolved once the limiter is ready to accept jobs
|
406 | * or rejected if it fails to start up.
|
407 | */
|
408 | ready(): Promise<any>;
|
409 |
|
410 | /**
|
411 | * Returns a datastore-specific object of redis clients.
|
412 | */
|
413 | clients(): Bottleneck.ClientsList;
|
414 |
|
415 | /**
|
416 | * Returns the name of the Redis pubsub channel used for this limiter
|
417 | */
|
418 | channel(): string;
|
419 |
|
420 | /**
|
421 | * Disconnects the underlying redis clients, unless the limiter was created with the `connection` option.
|
422 | * @param flush - Write transient data before closing.
|
423 | */
|
424 | disconnect(flush?: boolean): Promise<void>;
|
425 |
|
426 | /**
|
427 | * Broadcast a string to every limiter in the Cluster.
|
428 | */
|
429 | publish(message: string): Promise<void>;
|
430 |
|
431 | /**
|
432 | * Returns an object with the current number of jobs per status.
|
433 | */
|
434 | counts(): Bottleneck.Counts;
|
435 |
|
436 | /**
|
437 | * Returns the status of the job with the provided job id.
|
438 | */
|
439 | jobStatus(id: string): Bottleneck.Status;
|
440 |
|
441 | /**
|
442 | * Returns the status of the job with the provided job id.
|
443 | */
|
444 | jobs(status?: Bottleneck.Status): string[];
|
445 |
|
446 | /**
|
447 | * Returns the number of requests queued.
|
448 | * @param priority - Returns the number of requests queued with the specified priority.
|
449 | */
|
450 | queued(priority?: number): number;
|
451 |
|
452 | /**
|
453 | * Returns the number of requests queued across the Cluster.
|
454 | */
|
455 | clusterQueued(): Promise<number>;
|
456 |
|
457 | /**
|
458 | * Returns whether there are any jobs currently in the queue or in the process of being added to the queue.
|
459 | */
|
460 | empty(): boolean;
|
461 |
|
462 | /**
|
463 | * Returns the total weight of jobs in a RUNNING or EXECUTING state in the Cluster.
|
464 | */
|
465 | running(): Promise<number>;
|
466 |
|
467 | /**
|
468 | * Returns the total weight of jobs in a DONE state in the Cluster.
|
469 | */
|
470 | done(): Promise<number>;
|
471 |
|
472 | /**
|
473 | * If a request was added right now, would it be run immediately?
|
474 | * @param weight - The weight of the request
|
475 | */
|
476 | check(weight?: number): Promise<boolean>;
|
477 |
|
478 | /**
|
479 | * Register an event listener.
|
480 | * @param name - The event name.
|
481 | * @param fn - The callback function.
|
482 | */
|
483 | on(name: "error", fn: (error: any) => void): void;
|
484 | on(name: "empty", fn: () => void): void;
|
485 | on(name: "idle", fn: () => void): void;
|
486 | on(name: "depleted", fn: (empty: boolean) => void): void;
|
487 | on(name: "message", fn: (message: string) => void): void;
|
488 | on(name: "debug", fn: (message: string, info: any) => void): void;
|
489 | on(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void;
|
490 | on(name: "received", fn: (info: Bottleneck.EventInfo) => void): void;
|
491 | on(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void;
|
492 | on(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void;
|
493 | on(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void;
|
494 | on(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise<number | void | null> | number | void | null): void;
|
495 | on(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void;
|
496 | on(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void;
|
497 |
|
498 | /**
|
499 | * Register an event listener for one event only.
|
500 | * @param name - The event name.
|
501 | * @param fn - The callback function.
|
502 | */
|
503 | once(name: "error", fn: (error: any) => void): void;
|
504 | once(name: "empty", fn: () => void): void;
|
505 | once(name: "idle", fn: () => void): void;
|
506 | once(name: "depleted", fn: (empty: boolean) => void): void;
|
507 | once(name: "message", fn: (message: string) => void): void;
|
508 | once(name: "debug", fn: (message: string, info: any) => void): void;
|
509 | once(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void;
|
510 | once(name: "received", fn: (info: Bottleneck.EventInfo) => void): void;
|
511 | once(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void;
|
512 | once(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void;
|
513 | once(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void;
|
514 | once(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise<number | void | null> | number | void | null): void;
|
515 | once(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void;
|
516 | once(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void;
|
517 |
|
518 | /**
|
519 | * Removes all registered event listeners.
|
520 | * @param name - The optional event name to remove listeners from.
|
521 | */
|
522 | removeAllListeners(name?: string): void;
|
523 |
|
524 | /**
|
525 | * Changes the settings for future requests.
|
526 | * @param options - The new settings.
|
527 | */
|
528 | updateSettings(options?: Bottleneck.ConstructorOptions): Bottleneck;
|
529 |
|
530 | /**
|
531 | * Adds to the reservoir count and returns the new value.
|
532 | */
|
533 | incrementReservoir(incrementBy: number): Promise<number>;
|
534 |
|
535 | /**
|
536 | * The `stop()` method is used to safely shutdown a limiter. It prevents any new jobs from being added to the limiter and waits for all Executing jobs to complete.
|
537 | */
|
538 | stop(options?: Bottleneck.StopOptions): Promise<void>;
|
539 |
|
540 | /**
|
541 | * Returns the current reservoir count, if any.
|
542 | */
|
543 | currentReservoir(): Promise<number | null>;
|
544 |
|
545 | /**
|
546 | * Chain this limiter to another.
|
547 | * @param limiter - The limiter that requests to this limiter must also follow.
|
548 | */
|
549 | chain(limiter?: Bottleneck): Bottleneck;
|
550 |
|
551 | wrap<R>(fn: () => PromiseLike<R>): (() => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions) => Promise<R>; };
|
552 | wrap<R, A1>(fn: (arg1: A1) => PromiseLike<R>): ((arg1: A1) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1) => Promise<R>; };
|
553 | wrap<R, A1, A2>(fn: (arg1: A1, arg2: A2) => PromiseLike<R>): ((arg1: A1, arg2: A2) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2) => Promise<R>; };
|
554 | wrap<R, A1, A2, A3>(fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3) => Promise<R>; };
|
555 | wrap<R, A1, A2, A3, A4>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<R>; };
|
556 | wrap<R, A1, A2, A3, A4, A5>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<R>; };
|
557 | wrap<R, A1, A2, A3, A4, A5, A6>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => Promise<R>; };
|
558 | wrap<R, A1, A2, A3, A4, A5, A6, A7>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => Promise<R>; };
|
559 | wrap<R, A1, A2, A3, A4, A5, A6, A7, A8>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => Promise<R>; };
|
560 | wrap<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => Promise<R>; };
|
561 | wrap<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike<R>): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => Promise<R>) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => Promise<R>; };
|
562 |
|
563 | submit<R>(fn: (callback: Bottleneck.Callback<R>) => void, callback: Bottleneck.Callback<R>): void;
|
564 | submit<R, A1>(fn: (arg1: A1, callback: Bottleneck.Callback<R>) => void, arg1: A1, callback: Bottleneck.Callback<R>): void;
|
565 | submit<R, A1, A2>(fn: (arg1: A1, arg2: A2, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, callback: Bottleneck.Callback<R>): void;
|
566 | submit<R, A1, A2, A3>(fn: (arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback<R>): void;
|
567 | submit<R, A1, A2, A3, A4>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback<R>): void;
|
568 | submit<R, A1, A2, A3, A4, A5>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback<R>): void;
|
569 | submit<R, A1, A2, A3, A4, A5, A6>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback<R>): void;
|
570 | submit<R, A1, A2, A3, A4, A5, A6, A7>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback<R>): void;
|
571 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback<R>): void;
|
572 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback<R>): void;
|
573 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback<R>): void;
|
574 |
|
575 | submit<R>(options: Bottleneck.JobOptions, fn: (callback: Bottleneck.Callback<R>) => void, callback: Bottleneck.Callback<R>): void;
|
576 | submit<R, A1>(options: Bottleneck.JobOptions, fn: (arg1: A1, callback: Bottleneck.Callback<R>) => void, arg1: A1, callback: Bottleneck.Callback<R>): void;
|
577 | submit<R, A1, A2>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, callback: Bottleneck.Callback<R>): void;
|
578 | submit<R, A1, A2, A3>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback<R>): void;
|
579 | submit<R, A1, A2, A3, A4>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback<R>): void;
|
580 | submit<R, A1, A2, A3, A4, A5>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback<R>): void;
|
581 | submit<R, A1, A2, A3, A4, A5, A6>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback<R>): void;
|
582 | submit<R, A1, A2, A3, A4, A5, A6, A7>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback<R>): void;
|
583 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback<R>): void;
|
584 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback<R>): void;
|
585 | submit<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback<R>) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback<R>): void;
|
586 |
|
587 | schedule<R>(fn: () => PromiseLike<R>): Promise<R>;
|
588 | schedule<R, A1>(fn: (arg1: A1) => PromiseLike<R>, arg1: A1): Promise<R>;
|
589 | schedule<R, A1, A2>(fn: (arg1: A1, arg2: A2) => PromiseLike<R>, arg1: A1, arg2: A2): Promise<R>;
|
590 | schedule<R, A1, A2, A3>(fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3): Promise<R>;
|
591 | schedule<R, A1, A2, A3, A4>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4): Promise<R>;
|
592 | schedule<R, A1, A2, A3, A4, A5>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5): Promise<R>;
|
593 | schedule<R, A1, A2, A3, A4, A5, A6>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6): Promise<R>;
|
594 | schedule<R, A1, A2, A3, A4, A5, A6, A7>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7): Promise<R>;
|
595 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8): Promise<R>;
|
596 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9): Promise<R>;
|
597 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10): Promise<R>;
|
598 |
|
599 | schedule<R>(options: Bottleneck.JobOptions, fn: () => PromiseLike<R>): Promise<R>;
|
600 | schedule<R, A1>(options: Bottleneck.JobOptions, fn: (arg1: A1) => PromiseLike<R>, arg1: A1): Promise<R>;
|
601 | schedule<R, A1, A2>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2) => PromiseLike<R>, arg1: A1, arg2: A2): Promise<R>;
|
602 | schedule<R, A1, A2, A3>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3): Promise<R>;
|
603 | schedule<R, A1, A2, A3, A4>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4): Promise<R>;
|
604 | schedule<R, A1, A2, A3, A4, A5>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5): Promise<R>;
|
605 | schedule<R, A1, A2, A3, A4, A5, A6>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6): Promise<R>;
|
606 | schedule<R, A1, A2, A3, A4, A5, A6, A7>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7): Promise<R>;
|
607 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8): Promise<R>;
|
608 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8, A9>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9): Promise<R>;
|
609 | schedule<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike<R>, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10): Promise<R>;
|
610 | }
|
611 |
|
612 | export default Bottleneck;
|
613 | }
|
614 |
|
615 |
|
\ | No newline at end of file |