OptionalonCalled when the task is complete.
The details of the task, or null if the task encountered an error.
OptionalonMay be called if an error has occurred.
The error that occurred.
OptionalonMay be called periodically to update the progress.
The cumulative amount of work done so far (monotonically increasing).
Optionaltotal: number
If known, the total amount of work, in the same units as completed. Matches the
total reported to onStart when one was provided; may be omitted when unknown.
OptionalonCalled once the task has actually begun — after any interactive source/destination acquisition (open/save pickers, permission prompts, network handshakes) has resolved.
Details about the task (resolved format, name, size, …).
Optionaltotal: number
If known, the total amount of work to be done, in the same units later reported to onProgress (for reads this is typically the source size in bytes). When provided, a consumer can render a determinate progress bar / percentage; when omitted it should fall back to an indeterminate (spinner) state.
If a promise is returned, it will be awaited before proceeding.
OptionalonMay be called if a warning has occurred.
Optionalmessage: string
The warning message.
Optionaldetails: TWarning
Optional details for the warning.
Interface for tracking long running tasks.