Interface Task
🏷️ Properties
context
context: undefined | TaskContext
Defined in: packages/task/index.ts:36
from
from: undefined | string
Defined in: packages/task/index.ts:26
id
id: number
Defined in: packages/task/index.ts:21
isCancelled
isCancelled: boolean
Defined in: packages/task/index.ts:30
isDone
isDone: boolean
Defined in: packages/task/index.ts:32
isPaused
isPaused: boolean
Defined in: packages/task/index.ts:31
isRunning
isRunning: boolean
Defined in: packages/task/index.ts:33
name
name: string
Defined in: packages/task/index.ts:22
param
param: Record<string, any>
Defined in: packages/task/index.ts:23
parent
parent: undefined | Task<any>
Defined in: packages/task/index.ts:37
path
path: string
Defined in: packages/task/index.ts:29
progress
progress: number
Defined in: packages/task/index.ts:24
state
state: TaskState
Defined in: packages/task/index.ts:34
to
to: undefined | string
Defined in: packages/task/index.ts:27
total
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