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
}

Type Parameters

Hierarchy

  • ProgressOptions

Properties

Properties

onProgress?: ((evt: Event) => void)

Type declaration

    • (evt: Event): void
    • Parameters

      • evt: Event

      Returns void