mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #26580 from albertorestifo/papaparse-node-stream
papaparse: Add NODE_STREAM_INPUT support
This commit is contained in:
Vendored
+7
-1
@@ -1,9 +1,10 @@
|
||||
// Type definitions for PapaParse v4.1
|
||||
// Type definitions for PapaParse v4.5
|
||||
// Project: https://github.com/mholt/PapaParse
|
||||
// Definitions by: Pedro Flemming <https://github.com/torpedro>
|
||||
// Rain Shen <https://github.com/rainshen49>
|
||||
// João Loff <https://github.com/jfloff>
|
||||
// John Reilly <https://github.com/johnnyreilly>
|
||||
// Alberto Restifo <https://github.com/albertorestifo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -18,6 +19,8 @@ export function parse(file: File, config?: ParseConfig): ParseResult;
|
||||
|
||||
export function parse(stream: ReadableStream, config?: ParseConfig): ParseResult;
|
||||
|
||||
export function parse(stream: typeof NODE_STREAM_INPUT, config?: ParseConfig): ReadableStream;
|
||||
|
||||
/**
|
||||
* Unparses javascript data objects and returns a csv string
|
||||
*/
|
||||
@@ -45,6 +48,9 @@ export const WORKERS_SUPPORTED: boolean;
|
||||
// The relative path to Papa Parse. This is automatically detected when Papa Parse is loaded synchronously.
|
||||
export const SCRIPT_PATH: string;
|
||||
|
||||
// When passed to Papa Parse a Readable stream is returned.
|
||||
export const NODE_STREAM_INPUT = 1;
|
||||
|
||||
/**
|
||||
* Configurable Properties
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,9 @@ Papa.parse(file, {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Papa.parse(Papa.NODE_STREAM_INPUT);
|
||||
|
||||
/**
|
||||
* Unparsing
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user