2018-06-21 15:49:53 +02:00
|
|
|
// Type definitions for pull-stream 3.6.8
|
|
|
|
// Project: https://github.com/pull-stream/pull-stream
|
|
|
|
// Definitions by: Jaco Greeff <https://github.com/jacogr>
|
|
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
|
|
|
|
/// <reference types="node"/>
|
|
|
|
|
2018-06-22 12:53:49 +02:00
|
|
|
declare module 'pull-stream' {
|
2018-06-25 09:37:22 +02:00
|
|
|
export type PullStream = {
|
|
|
|
// FIXME this should be actual streams, not 'any'
|
2018-09-14 14:01:24 +02:00
|
|
|
(...streams: Array<any>): void;
|
2018-06-21 15:49:53 +02:00
|
|
|
|
|
|
|
collect: (cb: (error: Error | null, values: Array<Buffer>) => any) => void,
|
2018-09-10 11:35:16 +02:00
|
|
|
drain: (handler: (message: Buffer) => void, errorHandler?: (error: Error) => boolean) => void;
|
2018-06-21 15:49:53 +02:00
|
|
|
values: (values: Array<string | Buffer>) => void;
|
|
|
|
};
|
|
|
|
|
2018-06-25 09:37:22 +02:00
|
|
|
const pull: PullStream;
|
|
|
|
|
|
|
|
export default pull;
|
2018-06-22 12:53:49 +02:00
|
|
|
}
|