Type parameter | Description |
---|---|
TArg |
the task's argument type |
TResult |
the task's result type |
TProgress |
the task's progress readout type |
Instantiates the task state with an action.
the task's action.
the task's action.
Development-time settings
Returns true if the task is in pending state.
Returns the UI state's debug name.
Returns the last reported progress of the pending task. Has no meaning if the task is not in pending state.
Returns the promise that resolves when the task is completed or is canceled.
Returns the result of the last completed task.
Cancels the pending task. If there isn't one, this call is no-op.
Runs the task.
The arbitrary argument to pass to the task.
Generated using TypeDoc
Represents and manages a state of an asynchronous task.
The task itself can accept one arbitrarily-typed argument.