API Reference
@univerjs
@univerjs/core
functions
Sequence

@univerjs/core v0.1.17Docs


Function: sequence()

function sequence(tasks): ISequenceExecuteResult

Execute tasks in sequence, if one of the tasks return false, the sequence will be stopped.

Parameters

ParameterTypeDescription
tasks() => boolean[]All tasks that need to be triggered.

Returns

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:58 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.