Checks if all handlers can handle the input. If not, throw an error based on the errors of the failed handlers.
Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
A promise resolving if the input can be handled, rejecting with an Error if not.
Combine the results of the handlers into a single output.
Handles the given input. This may only be called if canHandle did not reject. When unconditionally calling both in sequence, consider handleSafe instead.
A promise resolving when handling is finished.
A promise resolving if the input can be handled, rejecting with an Error if not.
Utility handler that allows combining the results of multiple handlers into one. Will run all the handlers and then call the abstract
combine
function with the results, which should return the output of the class.If
requireAll
is true, the handler will fail if any of the handlers do not support the input. IfrequireAll
is false, only the handlers that support the input will be called, only if all handlers reject the input will this handler reject as well. WithrequireAll
set to false, the length of the input array for thecombine
function is variable (but always at least 1).