Interface Task
🏷️ Properties
context readonly
context: undefined | TaskContext
Defined in: packages/task/index.ts:36
from readonly
from: undefined | string
Defined in: packages/task/index.ts:26
id readonly
id: number
Defined in: packages/task/index.ts:21
isCancelled readonly
isCancelled: boolean
Defined in: packages/task/index.ts:30
isDone readonly
isDone: boolean
Defined in: packages/task/index.ts:32
isPaused readonly
isPaused: boolean
Defined in: packages/task/index.ts:31
isRunning readonly
isRunning: boolean
Defined in: packages/task/index.ts:33
name readonly
name: string
Defined in: packages/task/index.ts:22
param readonly
param: Record<string, any>
Defined in: packages/task/index.ts:23
parent readonly
parent: undefined | Task<any>
Defined in: packages/task/index.ts:37
path readonly
path: string
Defined in: packages/task/index.ts:29
progress readonly
progress: number
Defined in: packages/task/index.ts:24
state readonly
state: TaskState
Defined in: packages/task/index.ts:34
to readonly
to: undefined | string
Defined in: packages/task/index.ts:27
total readonly
total: number
Defined in: packages/task/index.ts:25
🔧 Methods
cancel
cancel(timeout: number): Promise<void>
Parameters
- timeout:
number
Return Type
Promise<void>
Defined in: packages/task/index.ts:41
map
map(transform: Transform<Task<T>, N>): Task<N extends Promise<R> ? R : N>
Parameters
- transform:
Transform<Task<T>, N>
Return Type
Task<N extends Promise<R> ? R : N>
Defined in: packages/task/index.ts:48
onChildUpdate
onChildUpdate(chunkSize: number): void
Parameters
- chunkSize:
number
Return Type
void
Defined in: packages/task/index.ts:46
pause
pause(): Promise<void>
Return Type
Promise<void>
Defined in: packages/task/index.ts:39
resume
resume(): Promise<void>
Return Type
Promise<void>
Defined in: packages/task/index.ts:40
setName
setName(name: string, param: Record<string, any>): Task<T>
Parameters
- name:
string
- param:
Record<string, any>
Return Type
Task<T>
Defined in: packages/task/index.ts:50
start
start(context: TaskContext, parent: Task<any>): void
Parameters
- context:
TaskContext
- parent:
Task<any>
Return Type
void
Defined in: packages/task/index.ts:42
startAndWait
startAndWait(context: TaskContext, parent: Task<any>): Promise<T>
Parameters
- context:
TaskContext
- parent:
Task<any>
Return Type
Promise<T>
Defined in: packages/task/index.ts:44
wait
wait(): Promise<T>
Return Type
Promise<T>
Defined in: packages/task/index.ts:43