File size: 3,690 Bytes
78c921d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/// <reference types="node" />
/// <reference types="node" />
/** @ignore */
export declare const ITERATOR_DONE: any;
/** @ignore */
export declare type FileHandle = import('fs').promises.FileHandle;
/** @ignore */
export declare type ArrowJSONLike = {
    schema: any;
    batches?: any[];
    dictionaries?: any[];
};
/** @ignore */
export declare type ReadableDOMStreamOptions = {
    type: 'bytes' | undefined;
    autoAllocateChunkSize?: number;
    highWaterMark?: number;
};
/** @ignore */
export declare class ArrowJSON {
    private _json;
    constructor(_json: ArrowJSONLike);
    get schema(): any;
    get batches(): any[];
    get dictionaries(): any[];
}
/** @ignore */
export interface Readable<T> {
    readonly closed: Promise<void>;
    cancel(reason?: any): Promise<void>;
    read(size?: number | null): Promise<T | null>;
    peek(size?: number | null): Promise<T | null>;
    throw(value?: any): Promise<IteratorResult<any>>;
    return(value?: any): Promise<IteratorResult<any>>;
    next(size?: number | null): Promise<IteratorResult<T>>;
}
/** @ignore */
export interface Writable<T> {
    readonly closed: Promise<void>;
    close(): void;
    write(chunk: T): void;
    abort(reason?: any): void;
}
/** @ignore */
export interface ReadableWritable<TReadable, TWritable> extends Readable<TReadable>, Writable<TWritable> {
    [Symbol.asyncIterator](): AsyncIterableIterator<TReadable>;
    toDOMStream(options?: ReadableDOMStreamOptions): ReadableStream<TReadable>;
    toNodeStream(options?: import('stream').ReadableOptions): import('stream').Readable;
}
/** @ignore */
export declare abstract class ReadableInterop<T> {
    abstract toDOMStream(options?: ReadableDOMStreamOptions): ReadableStream<T>;
    abstract toNodeStream(options?: import('stream').ReadableOptions): import('stream').Readable;
    tee(): [ReadableStream<T>, ReadableStream<T>];
    pipe<R extends NodeJS.WritableStream>(writable: R, options?: {
        end?: boolean;
    }): R;
    pipeTo(writable: WritableStream<T>, options?: StreamPipeOptions): Promise<void>;
    pipeThrough<R extends ReadableStream<any>>(duplex: {
        writable: WritableStream<T>;
        readable: R;
    }, options?: StreamPipeOptions): ReadableStream<any>;
    protected _DOMStream?: ReadableStream<T>;
    private _getDOMStream;
    protected _nodeStream?: import('stream').Readable;
    private _getNodeStream;
}
/** @ignore */
declare type Resolution<T> = {
    resolve: (value: T | PromiseLike<T>) => void;
    reject: (reason?: any) => void;
};
/** @ignore */
export declare class AsyncQueue<TReadable = Uint8Array, TWritable = TReadable> extends ReadableInterop<TReadable> implements AsyncIterableIterator<TReadable>, ReadableWritable<TReadable, TWritable> {
    protected _values: TWritable[];
    protected _error?: {
        error: any;
    };
    protected _closedPromise: Promise<void>;
    protected _closedPromiseResolve?: (value?: any) => void;
    protected resolvers: Resolution<IteratorResult<TReadable>>[];
    constructor();
    get closed(): Promise<void>;
    cancel(reason?: any): Promise<void>;
    write(value: TWritable): void;
    abort(value?: any): void;
    close(): void;
    [Symbol.asyncIterator](): this;
    toDOMStream(options?: ReadableDOMStreamOptions): ReadableStream<TReadable>;
    toNodeStream(options?: import('stream').ReadableOptions): import("stream").Readable;
    throw(_?: any): Promise<any>;
    return(_?: any): Promise<any>;
    read(size?: number | null): Promise<TReadable | null>;
    peek(size?: number | null): Promise<TReadable | null>;
    next(..._args: any[]): Promise<IteratorResult<TReadable>>;
    protected _ensureOpen(): boolean;
}
export {};