UNPKG

690 BTypeScriptView Raw
1import { Readable, Transform, TransformOptions, Writable } from "stream";
2import JSON2CSVBase = require("./JSON2CSVBase");
3import JSON2CSVTransform = require("./JSON2CSVTransform");
4
5declare class JSON2CSVAsyncParser<T> extends JSON2CSVBase<T> {
6 input: Transform;
7 processor: Writable;
8 transform: JSON2CSVTransform<T>;
9
10 constructor(opts?: json2csv.Options<T>, transformOpts?: TransformOptions);
11
12 fromInput(input: Readable): JSON2CSVAsyncParser<T>;
13
14 throughTransform(transform: Transform): JSON2CSVAsyncParser<T>;
15
16 toOutput(output: Writable): JSON2CSVAsyncParser<T>;
17
18 promise(returnCSV?: boolean): Promise<undefined | string>;
19}
20
21export = JSON2CSVAsyncParser;