Open History to see the last commit
1export function shouldThrowError<T extends (...args: any[]) => boolean>(
2 _useErrorBoundary: boolean | T | undefined,
3 params: Parameters<T>,
4): boolean {
5 // Allow useErrorBoundary function to override throwing behavior on a per-error basis
6 if (typeof _useErrorBoundary === 'function') {
7 return _useErrorBoundary(...params)
8 }
9β
10 return !!_useErrorBoundary
11}