DefinitelyTyped/types/stream-to-string/index.d.ts

18 lines
584 B
TypeScript
Raw Permalink Normal View History

2018-11-19 19:44:56 +00:00
// Type definitions for stream-to-string 1.1
// Project: https://github.com/jasonpincin/stream-to-string
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export = streamToString;
2018-11-21 17:54:35 +00:00
declare function streamToString(stream: NodeJS.ReadableStream, cb?: Callback): Promise<string>;
2018-11-19 19:44:56 +00:00
declare function streamToString(
stream: NodeJS.ReadableStream,
enc: string,
cb?: Callback
): Promise<string>;
type Callback = (error: Error | undefined, str: string) => void;