@univerjs/core v0.4.2 • Docs
Function: sequenceAsync()
function sequenceAsync(tasks): Promise<ISequenceExecuteResult>
Execute promise tasks in sequence, if one of the tasks return false, the sequence will be stopped.
Parameters
Parameter | Type | Description |
---|---|---|
tasks | () => boolean | Promise <boolean >[] | All promise tasks that need to be triggered. |
Returns
Promise
<ISequenceExecuteResult
>
Returns true
if all tasks are executed successfully, otherwise false
and index of the task that returns false.
Defined in
submodules/univer/packages/core/src/common/sequence.ts:28 (opens in a new tab)