Class AbortableTask
🏭 Constructors
constructor
new AbortableTask(): AbortableTask<T>
Return Type
AbortableTask<T>
Inherited from: BaseTask.constructor
Defined in: packages/task/index.ts:95
🏷️ Properties
_from
_from: undefined | string
Inherited from: BaseTask._from
Defined in: packages/task/index.ts:80
_id
_id: number = 0
Inherited from: BaseTask._id
Defined in: packages/task/index.ts:85
_path
_path: string = ''
Inherited from: BaseTask._path
Defined in: packages/task/index.ts:84
_pausing
_pausing: Promise<void> = ...
Defined in: packages/task/index.ts:224
_progress
_progress: number = 0
Inherited from: BaseTask._progress
Defined in: packages/task/index.ts:82
_promise
_promise: Promise<T>
Inherited from: BaseTask._promise
Defined in: packages/task/index.ts:75
_state
_state: TaskState = TaskState.Idle
Inherited from: BaseTask._state
Defined in: packages/task/index.ts:74
_to
_to: undefined | string
Inherited from: BaseTask._to
Defined in: packages/task/index.ts:81
_total
_total: number = -1
Inherited from: BaseTask._total
Defined in: packages/task/index.ts:83
context
context: TaskContext = {}
Inherited from: BaseTask.context
Defined in: packages/task/index.ts:88
name
name: string = ''
Inherited from: BaseTask.name
Defined in: packages/task/index.ts:90
param
param: object = {}
Inherited from: BaseTask.param
Defined in: packages/task/index.ts:91
parent
parent: undefined | Task<any>
Inherited from: BaseTask.parent
Defined in: packages/task/index.ts:87
reject
reject: Function
Inherited from: BaseTask.reject
Defined in: packages/task/index.ts:78
resolve
resolve: Function
Inherited from: BaseTask.resolve
Defined in: packages/task/index.ts:77
resultOrError
resultOrError: any
Inherited from: BaseTask.resultOrError
Defined in: packages/task/index.ts:93
🔑 Accessors
from
Inherited from: BaseTask.from
Defined in: packages/task/index.ts:121
id
Inherited from: BaseTask.id
Defined in: packages/task/index.ts:116
isCancelled
Inherited from: BaseTask.isCancelled
Defined in: packages/task/index.ts:124
isDone
Inherited from: BaseTask.isDone
Defined in: packages/task/index.ts:126
isPaused
Inherited from: BaseTask.isPaused
Defined in: packages/task/index.ts:125
isRunning
Inherited from: BaseTask.isRunning
Defined in: packages/task/index.ts:127
path
Inherited from: BaseTask.path
Defined in: packages/task/index.ts:117
progress
Inherited from: BaseTask.progress
Defined in: packages/task/index.ts:118
state
Inherited from: BaseTask.state
Defined in: packages/task/index.ts:122
to
Inherited from: BaseTask.to
Defined in: packages/task/index.ts:120
total
Inherited from: BaseTask.total
Defined in: packages/task/index.ts:119
🔧 Methods
_onAborted
_onAborted(): void
Return Type
void
Defined in: packages/task/index.ts:226
_onResume
_onResume(): void
Return Type
void
Defined in: packages/task/index.ts:227
_unpause
_unpause(): void
Return Type
void
Defined in: packages/task/index.ts:225
abort
abort(isCancelled: boolean): void
Parameters
- isCancelled:
boolean
Return Type
void
Defined in: packages/task/index.ts:230
cancel
cancel(timeout: number): Promise<void>
Parameters
- timeout:
number
Return Type
Promise<void>
Inherited from: BaseTask.cancel
Defined in: packages/task/index.ts:145
cancelTask
cancelTask(): Promise<void>
Return Type
Promise<void>
Defined in: packages/task/index.ts:233
get
get(): void | T
Return Type
void | T
Inherited from: BaseTask.get
Defined in: packages/task/index.ts:108
isAbortedError
isAbortedError(e: any): boolean
Parameters
- e:
any
Return Type
boolean
Defined in: packages/task/index.ts:231
map
map(transform: Transform<AbortableTask<T>, N>): Task<N extends Promise<R> ? R : N>
Parameters
- transform:
Transform<AbortableTask<T>, N>
Return Type
Task<N extends Promise<R> ? R : N>
Inherited from: BaseTask.map
Defined in: packages/task/index.ts:212
onChildUpdate
onChildUpdate(chunkSize: number): void
Parameters
- chunkSize:
number
Return Type
void
Inherited from: BaseTask.onChildUpdate
Defined in: packages/task/index.ts:205
pause
pause(): Promise<void>
Return Type
Promise<void>
Inherited from: BaseTask.pause
Defined in: packages/task/index.ts:129
pauseTask
pauseTask(): Promise<void>
Return Type
Promise<void>
Defined in: packages/task/index.ts:240
process
process(): Promise<T>
Return Type
Promise<T>
Defined in: packages/task/index.ts:229
resume
resume(): Promise<void>
Return Type
Promise<void>
Inherited from: BaseTask.resume
Defined in: packages/task/index.ts:137
resumeTask
resumeTask(): Promise<void>
Return Type
Promise<void>
Defined in: packages/task/index.ts:250
runTask
runTask(): Promise<T>
Return Type
Promise<T>
Defined in: packages/task/index.ts:257
setName
setName(name: string, param: object): AbortableTask<T>
Parameters
- name:
string
- param:
object
Return Type
AbortableTask<T>
Inherited from: BaseTask.setName
Defined in: packages/task/index.ts:102
start
start(context: TaskContext, parent: Task<any>): void
Parameters
- context:
TaskContext
- parent:
Task<any>
Return Type
void
Inherited from: BaseTask.start
Defined in: packages/task/index.ts:164
startAndWait
startAndWait(context: TaskContext, parent: Task<any>): Promise<T>
Parameters
- context:
TaskContext
- parent:
Task<any>
Return Type
Promise<T>
Inherited from: BaseTask.startAndWait
Defined in: packages/task/index.ts:195
update
update(chunkSize: number): void
Parameters
- chunkSize:
number
Return Type
void
Inherited from: BaseTask.update
Defined in: packages/task/index.ts:200
wait
wait(): Promise<T>
Return Type
Promise<T>
Inherited from: BaseTask.wait
Defined in: packages/task/index.ts:160