electron-ipc-module
    Preparing search index...

    Interface IpcStream<T>

    What a generated bridge method returns for a stream channel.

    Deliberately an iterator rather than an AsyncIterable: contextBridge drops symbol-keyed properties, so a [Symbol.asyncIterator] method would type-check in the renderer and then be missing there. Wrap it to for await:

    const run = window.ipc.export.run("in.mp4");
    for await (const chunk of { [Symbol.asyncIterator]: () => run }) { ... }
    interface IpcStream<T> {
        cancel(): void;
        next(): Promise<IteratorResult<T, undefined>>;
        return(): Promise<IteratorResult<T, undefined>>;
    }

    Type Parameters

    • T
    Index
    • The next chunk; rejects with the stream's error, like a failed invoke.

      Returns Promise<IteratorResult<T, undefined>>