mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
fix: changed r/w interfaces from fs to stream
This commit is contained in:
+3
-4
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user