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