UNPKG

webcontainer-sandbox-react

Version:

A React component library for WebContainer-based code sandboxes

21 lines (20 loc) 1.05 kB
declare class ProcessOutput extends EventTarget { private buffer; private maxBufferSize; private isReading; private sourceStream; private abortController; private onErrorStream; constructor(sourceStream: ReadableStream<string>, onErrorStream: (error: string) => void); private startReading; getBuffer(): string[]; createStream(): ReadableStream<string>; cleanup(): void; onData(listener: (event: CustomEvent<Uint8Array>) => void, options?: AddEventListenerOptions): void; onEnd(listener: (event: CustomEvent<void>) => void, options?: AddEventListenerOptions): void; onError(listener: (event: CustomEvent<Error>) => void, options?: AddEventListenerOptions): void; offData(listener: (event: CustomEvent<Uint8Array>) => void, options?: EventListenerOptions): void; offEnd(listener: (event: CustomEvent<void>) => void, options?: EventListenerOptions): void; offError(listener: (event: CustomEvent<Error>) => void, options?: EventListenerOptions): void; } export default ProcessOutput;