Skip to content

Class: TaskItem

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TaskItem(task?): TaskItem

Parameters

NameType
task?IFunction

Returns

TaskItem

Defined in

leafer/packages/task/src/TaskItem.ts:23

Properties

id

Readonly id: number

Defined in

leafer/packages/task/src/TaskItem.ts:11


parent

parent: TaskProcessor

Implementation of

ITaskItem.parent

Defined in

leafer/packages/task/src/TaskItem.ts:13


parallel

parallel: boolean = true

Implementation of

ITaskItem.parallel

Defined in

leafer/packages/task/src/TaskItem.ts:15


time

time: number = 1

Implementation of

ITaskItem.time

Defined in

leafer/packages/task/src/TaskItem.ts:16


isComplete

isComplete: boolean

Implementation of

ITaskItem.isComplete

Defined in

leafer/packages/task/src/TaskItem.ts:18


isCancel

isCancel: boolean

Implementation of

ITaskItem.isCancel

Defined in

leafer/packages/task/src/TaskItem.ts:19


task

Private task: IFunction

Defined in

leafer/packages/task/src/TaskItem.ts:21

Methods

run

run(): Promise<void>

Returns

Promise<void>

Implementation of

ITaskItem.run

Defined in

leafer/packages/task/src/TaskItem.ts:28


complete

complete(): void

Returns

void

Implementation of

ITaskItem.complete

Defined in

leafer/packages/task/src/TaskItem.ts:36


cancel

cancel(): void

Returns

void

Implementation of

ITaskItem.cancel

Defined in

leafer/packages/task/src/TaskItem.ts:42

Released under the MIT License.