export function shouldThrowError) => boolean>( throwError: boolean | T | undefined, params: Parameters, ): boolean { // Allow throwError function to override throwing behavior on a per-error basis if (typeof throwError === 'function') { return throwError(...params) } return !!throwError } export function noop() {}