Task <Input, Output>
Hierarchy
- WorkUnit<{}, Input, Output>
- Task
Index
Events
readonlyonFail
readonlyonPass
Called when an execution succeeds.
readonlyonRun
Called before a work unit is executed. Can return true
to skip the work unit.
readonlyonSkip
Called when an execution is skipped.
Other
constructor
Type parameters
- Input = unknown
- Output = Input
depth
Current depth of nested pipelines.
index
Current index amongst sibling work units.
optionalinput
readonlyoptions
Validated and configured options.
optionaloutput
startTime
statusText
stopTime
readonlytitle
id
Return a unique hierarchical ID.
blueprint
Define an
optimal
blueprint in which to validate and build the options object passed to the constructor, or when manual setting.A boolean is passed as the 2nd argument to determine whether this is validating on class instantiation (first time), or by calling
configure()
(all other times).
configure
Set an options object by merging the new partial and existing options with the defined blueprint, while running all validation checks. Freeze and return the options object.
object.configure({ name: 'Boost' });
object.configure((prevOptions) => ({
nestedObject: {
...prevOptions.nestedObject,
some: 'value',
},
}));
hasFailed
Return true if the task failed when executing.
hasPassed
Return true if the task executed successfully.
isComplete
Return true if the task has been completed in any form.
isPending
Return true if the task has not been executed yet.
isRunning
Return true if the task is currently running.
isSkipped
Return true if the task was or will be skipped.
run
Run the current task by executing it and performing any before and after processes.
skip
Mark a task as skipped if the condition is true.
Called when an execution fails.