semblance_backup/node_modules/@tanstack/react-query/src/utils.ts
2025-08-04 09:07:59 -05:00

13 lines
368 B
TypeScript

export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
throwError: boolean | T | undefined,
params: Parameters<T>,
): 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() {}