Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/lib/typings/event-stream.d.ts
4772 views
1
declare module "event-stream" {
2
import { Stream } from 'stream';
3
import { ThroughStream as _ThroughStream } from 'through';
4
import File from 'vinyl';
5
6
export interface ThroughStream extends _ThroughStream {
7
queue(data: File | null): any;
8
push(data: File | null): any;
9
paused: boolean;
10
}
11
12
function merge(streams: Stream[]): ThroughStream;
13
function merge(...streams: Stream[]): ThroughStream;
14
function concat(...stream: Stream[]): ThroughStream;
15
function duplex(istream: Stream, ostream: Stream): ThroughStream;
16
17
function through(write?: (this: ThroughStream, data: any) => void, end?: (this: ThroughStream) => void,
18
opts?: { autoDestroy: boolean; }): ThroughStream;
19
20
function readArray<T>(array: T[]): ThroughStream;
21
function writeArray<T>(cb: (err: Error, array: T[]) => void): ThroughStream;
22
23
function mapSync<I, O>(cb: (data: I) => O): ThroughStream;
24
function map<I, O>(cb: (data: I, cb: (err?: Error, data?: O) => void) => O): ThroughStream;
25
26
function readable(asyncFunction: (this: ThroughStream, ...args: unknown[]) => any): any;
27
}
28
29