Critical: The finalize function/task receives outputs from all children, including those
that have failed. This behaves similar to Promise.allSettled() - you get the results
regardless of individual child success or failure. This allows you to implement custom error
handling logic, such as failing the parent only if critical children fail, or providing partial
results. As a caveat, always check the status of child executions in the finalize function/task.
No validation is done on the input and the output of the parent task is the output of the
finalize task.
Type Parameters
TRunOutput = unknown
The type of the parent task's run output
TOutput = unknown
The type of the finalize task's output (becomes the parent task's output)
TFinalizeTaskRunOutput = unknown
If finalize is a parent task, the type of its run output
Options for the
finalize
property in ParentTaskOptions. It is similar to TaskOptions or ParentTaskOptions but the input is of the form:Critical: The
finalize
function/task receives outputs from all children, including those that have failed. This behaves similar toPromise.allSettled()
- you get the results regardless of individual child success or failure. This allows you to implement custom error handling logic, such as failing the parent only if critical children fail, or providing partial results. As a caveat, always check the status of child executions in the finalize function/task.No validation is done on the input and the output of the parent task is the output of the
finalize
task.