Preparing search index...
The search index is not available
API References
API References
js
Task
Class Task<T, I>
Type Parameters
T
I
extends
any
[]
=
[
]
Hierarchy
Task
Index
Properties
callback
children
context
status
result
error
event
Emitter
Constructors
constructor
Methods
run
force
Run
load
With
reset
set
Children
get
Children
get
Descendants
set
Context
get
Context
get
Status
get
Result
get
Error
is
Pending
is
Running
is
Completed
is
Successful
is
Failed
is
Canceled
on
Status
Change
on
Status
Change
To
on
Success
on
Failure
on
Cancel
set
Status
Properties
Protected
callback
callback
:
TaskCallback
<
T
,
I
>
Protected
children
children
:
Task
<
any
,
any
[]
>
[]
Protected
context
context
:
object
Protected
status
status
:
TaskStatus
= 'pending'
Protected
result
result
:
undefined
|
T
= undefined
Protected
error
error
:
unknown
= undefined
Protected
event
Emitter
event
Emitter
:
EventEmitter
<
string
|
symbol
,
any
>
Constructors
constructor
new
Task
<
T
,
I
>
(
callback
:
TaskCallback
<
T
,
I
>
, children
?:
Task
<
any
,
any
[]
>
[]
, context
?:
object
)
:
Task
<
T
,
I
>
Type Parameters
T
I
extends
any
[]
=
[
]
Parameters
callback:
TaskCallback
<
T
,
I
>
children:
Task
<
any
,
any
[]
>
[]
= []
context:
object
= {}
Returns
Task
<
T
,
I
>
Methods
run
run
(
options
?:
TaskOptions
,
...
inputs
:
I
)
:
Promise
<
T
>
Parameters
options:
TaskOptions
= {}
Rest
...
inputs:
I
Returns
Promise
<
T
>
Protected
force
Run
force
Run
(
options
?:
TaskOptions
,
...
inputs
:
I
)
:
Promise
<
T
>
Parameters
options:
TaskOptions
= {}
Rest
...
inputs:
I
Returns
Promise
<
T
>
load
With
load
With
(
preloadedResult
:
T
)
:
Task
<
T
,
I
>
Parameters
preloadedResult:
T
Returns
Task
<
T
,
I
>
reset
reset
(
)
:
Task
<
T
,
I
>
Returns
Task
<
T
,
I
>
set
Children
set
Children
(
children
:
Task
<
any
,
any
[]
>
[]
)
:
Task
<
T
,
I
>
Parameters
children:
Task
<
any
,
any
[]
>
[]
Returns
Task
<
T
,
I
>
get
Children
get
Children
(
)
:
Task
<
any
,
any
[]
>
[]
Returns
Task
<
any
,
any
[]
>
[]
get
Descendants
get
Descendants
(
)
:
Task
<
any
,
any
[]
>
[]
Returns
Task
<
any
,
any
[]
>
[]
set
Context
set
Context
(
context
:
object
)
:
Task
<
T
,
I
>
Parameters
context:
object
Returns
Task
<
T
,
I
>
get
Context
get
Context
<
C
>
(
)
:
C
Type Parameters
C
extends
object
=
object
Returns
C
get
Status
get
Status
(
)
:
TaskStatus
Returns
TaskStatus
get
Result
get
Result
(
)
:
undefined
|
T
Returns
undefined
|
T
get
Error
get
Error
(
)
:
unknown
Returns
unknown
is
Pending
is
Pending
(
)
:
boolean
Returns
boolean
is
Running
is
Running
(
)
:
boolean
Returns
boolean
is
Completed
is
Completed
(
)
:
boolean
Returns
boolean
is
Successful
is
Successful
(
)
:
boolean
Returns
boolean
is
Failed
is
Failed
(
)
:
boolean
Returns
boolean
is
Canceled
is
Canceled
(
)
:
boolean
Returns
boolean
on
Status
Change
on
Status
Change
(
callback
:
(
(
status
:
TaskStatus
)
=>
unknown
)
)
:
Task
<
T
,
I
>
Parameters
callback:
(
(
status
:
TaskStatus
)
=>
unknown
)
(
status
:
TaskStatus
)
:
unknown
Parameters
status:
TaskStatus
Returns
unknown
Returns
Task
<
T
,
I
>
on
Status
Change
To
on
Status
Change
To
(
status
:
TaskStatus
, callback
:
(
(
)
=>
unknown
)
)
:
Task
<
T
,
I
>
Parameters
status:
TaskStatus
callback:
(
(
)
=>
unknown
)
(
)
:
unknown
Returns
unknown
Returns
Task
<
T
,
I
>
on
Success
on
Success
(
callback
:
(
(
)
=>
unknown
)
)
:
Task
<
T
,
I
>
Parameters
callback:
(
(
)
=>
unknown
)
(
)
:
unknown
Returns
unknown
Returns
Task
<
T
,
I
>
on
Failure
on
Failure
(
callback
:
(
(
)
=>
unknown
)
)
:
Task
<
T
,
I
>
Parameters
callback:
(
(
)
=>
unknown
)
(
)
:
unknown
Returns
unknown
Returns
Task
<
T
,
I
>
on
Cancel
on
Cancel
(
callback
:
(
(
)
=>
unknown
)
)
:
Task
<
T
,
I
>
Parameters
callback:
(
(
)
=>
unknown
)
(
)
:
unknown
Returns
unknown
Returns
Task
<
T
,
I
>
Protected
set
Status
set
Status
(
newStatus
:
TaskStatus
)
:
void
Parameters
newStatus:
TaskStatus
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
API
References
js-
plugin-
aws -
v0.19.1
js-
plugin-
nft-
storage -
v0.19.1
js -
v0.19.1
Task
callback
children
context
status
result
error
event
Emitter
constructor
run
force
Run
load
With
reset
set
Children
get
Children
get
Descendants
set
Context
get
Context
get
Status
get
Result
get
Error
is
Pending
is
Running
is
Completed
is
Successful
is
Failed
is
Canceled
on
Status
Change
on
Status
Change
To
on
Success
on
Failure
on
Cancel
set
Status
Generated using
TypeDoc