Define an onProgress callback that can be invoked with ProgressEvents
onProgress
ProgressEvent
type MyOperationProgressEvents = ProgressEvent<'operation:start'> | ProgressEvent<'operation:success', Result> | ProgressEvent<'operation:error', Error>export interface MyOperationOptions extends ProgressOptions<MyOperationProgressEvents> { // define options here} Copy
type MyOperationProgressEvents = ProgressEvent<'operation:start'> | ProgressEvent<'operation:success', Result> | ProgressEvent<'operation:error', Error>export interface MyOperationOptions extends ProgressOptions<MyOperationProgressEvents> { // define options here}
Optional
Define an
onProgress
callback that can be invoked withProgressEvent
sExample