Input data that could potentially be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Handles the given input. This should only be done if the canHandle function returned true
.
Therefore, consider using the handleSafe function instead.
Input data that needs to be handled.
A promise resolving when the handling is finished. Return value depends on the given type.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not. Return value depends on the given type.
Checks if the input data can be handled by this class. Throws an error if it can't handle the data.