Type of the return value. Caller must ensure to provide the valid type.
The failure type. If the operation fails, this type will be returned.
Retrieves the error returned by the async operation. Only valid if AsyncOpBase.isError returns true.
Return error of the async operation.
An opaque identifier that uniquely identifies this AsyncOp on the system. The returned is not specified, but guaranteed to be the same during runtime.
Returns true if the async operation has completed.
Returns true if the async operation has failed.
Returns true if the async operation is pending completion or failure.
Retrieves the value returned by the async operation. Only valid if AsyncOpBase.isComplete returns true.
Return value of the async operation.
Attaches a failure handler to the async op.
The callback to be called as continuation.
this
Attaches a finalization handler to the async op.
OptionalonFinally: () => void
The callback to be called in case of success or failure.
A native Promise that settles with the original result after the handler runs.
Determines if this async op matches the specified identifier.
Attaches a legacy combined completion handler to the async op.
Same as an AsyncOp, but allows returning errors in case the operation fails.
Note
UncertainAsyncOp works like a regular
Promiseand allows async functions toawaitthe result.