Lace JavaScript API
    Preparing search index...

    Interface StoreStream

    The open counterpart of store: offers run one at a time to fixed points. An error, including an interrupted offer, ends the stream; later offers reject with it. A concurrent offer rejects as busy.

    interface StoreStream {
        close(): Promise<void>;
        offer(record: Record): Promise<"skipped" | "saved">;
    }
    Index
    • Rejects with the error that ended the stream and any cleanup failure.

      Returns Promise<void>

    • 'saved' when the provider sent the record before the next fixed point, 'skipped' otherwise or at once when the provider already held it.

      Parameters

      Returns Promise<"skipped" | "saved">