You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yes, i changed level in ErrorBoundaryProps to this level?: LEVEL | ((error: Error, errorInfo: ErrorInfo) => LEVEL);
if i use it const level = (error: Error, info: ErrorInfo): LEVEL => error instanceof TypeError ? LEVEL_ERROR : LEVEL_WARN; i have failed: (error, info) => error instanceof TypeError ? _rollbar_react__WEBPACK_IMPORTED_MODULE_0__.LEVEL_ERROR : _rollbar_react__WEBPACK_IMPORTED_MODULE_0__.LEVEL_WARN is not a valid level setting for Rollbar
if i use it const level = (error: Error, info: ErrorInfo): LEVEL => error instanceof TypeError ? 'error' : 'warn'; i have Uncaught Error: Invariant failed: (error, info) => error instanceof TypeError ? 'error' : 'warn' is not a valid level setting for Rollbar
Errors from tiny-invariant and i can't find resolve
Hello, everyone!
My App is React with TS latest version.
I wanted to pass level, errorMessage , extra to ErrorBoundary like this:
const level = (error: Error, info: ErrorInfo): LEVEL => error instanceof TypeError ? LEVEL_ERROR : LEVEL_WARN;
but i get an error:
Type '(error: any, info: any) => "warn" | "error"' is not assignable to type 'LEVEL | (() => LEVEL) | undefined'.
I changed type in index.d.ts in @rollbar package with pass (error, info) to this values in ErrorBoundaryProps, but it doesn't help for me.
I did something wrong or what?
The text was updated successfully, but these errors were encountered: