fix: changed r/w interfaces from fs to stream

This commit is contained in:
dangoo
2019-04-15 13:26:18 +02:00
parent 02279fbd13
commit 131387a849
+3 -4
View File
@@ -1,5 +1,4 @@
import { ReadStream, WriteStream } from "fs";
import { Transform, TransformOptions, Writable } from "stream";
import { Transform, TransformOptions, Writable, Readable } from "stream";
import JSON2CSVBase, { json2csv } from "./JSON2CSVBase";
import JSON2CSVTransform from "./JSON2CSVTransform";
@@ -11,11 +10,11 @@ declare class JSON2CSVAsyncParser<T> extends JSON2CSVBase<T> {
constructor(opts?: json2csv.Options<T>, transformOpts?: TransformOptions);
public fromInput(input: ReadStream): JSON2CSVAsyncParser<T>;
public fromInput(input: Readable): JSON2CSVAsyncParser<T>;
public throughTransform(transform: Transform): JSON2CSVAsyncParser<T>;
public toOutput(output: WriteStream): JSON2CSVAsyncParser<T>;
public toOutput(output: Writable): JSON2CSVAsyncParser<T>;
public promise(): Promise<string>;
}