Type Alias SerialConstructor<TFn>

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

Options for serial function

Type Parameters

  • TFn

Type declaration

  • fn: (checkCancel: CheckCancelFn, current: SerialId) => TFn

    Function creator that returns the async function to be wrapped

  • OptionalonCancel?: SerialEventCancelCallback

    Optional callback to be called when the event is cancelled

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