Interface ProgressOptions<Event>

Define an onProgress callback that can be invoked with ProgressEvents

Example

type MyOperationProgressEvents =
ProgressEvent<'operation:start'> |
ProgressEvent<'operation:success', Result> |
ProgressEvent<'operation:error', Error>

export interface MyOperationOptions extends ProgressOptions<MyOperationProgressEvents> {
// define options here
}
interface ProgressOptions<Event> {
    onProgress?: ((evt) => void);
}

Type Parameters

Properties

Properties

onProgress?: ((evt) => void)

Type declaration

    • (evt): void
    • Parameters

      Returns void