Interface SerialConstructor<TFn>

Source
Expand description

Options to construct a serial function

interface SerialConstructor<TFn> {
    fn: (checkCancel: CheckCancelFn, current: bigint) => TFn;
    onCancel?: SerialEventCancelCallback;
}

Properties§

§fn: { ... }

Function creator that returns the async function to be wrapped

§onCancel?: SerialEventCancelCallback

Optional callback to be called when the event is cancelled

This is guaranteed to be only called at most once per execution