1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { Transform, Writable } from 'stream';
|
18 | import { ParsedArguments } from './';
|
19 | interface ResourceEvents<T> {
|
20 | addListener(event: 'data', listener: (data: T) => void): this;
|
21 | emit(event: 'data', data: T): boolean;
|
22 | on(event: 'data', listener: (data: T) => void): this;
|
23 | once(event: 'data', listener: (data: T) => void): this;
|
24 | prependListener(event: 'data', listener: (data: T) => void): this;
|
25 | prependOnceListener(event: 'data', listener: (data: T) => void): this;
|
26 | removeListener(event: 'data', listener: (data: T) => void): this;
|
27 | }
|
28 | export declare class ResourceStream<T> extends Transform implements ResourceEvents<T> {
|
29 | _ended: boolean;
|
30 | _maxApiCalls: number;
|
31 | _nextQuery: {} | null;
|
32 | _otherArgs: unknown[];
|
33 | _reading: boolean;
|
34 | _requestFn: Function;
|
35 | _requestsMade: number;
|
36 | _resultsToSend: number;
|
37 | constructor(args: ParsedArguments, requestFn: Function);
|
38 | end(...args: any[]): ReturnType<Writable['end']> extends Writable ? this : void;
|
39 | _read(): void;
|
40 | }
|
41 | export {};
|