export declare class ErrorBoundary { private readonly errorCallback; private _error?; constructor(errorCallback: (err: Error) => void); /** * Executes callback() and then runs errorCallback() on error. * This will never throw but instead return `errorValue` if an error occurred. */ try(callback: () => T, errorValue?: E): T | typeof errorValue; reportError(err: Error): void; get error(): Error | undefined; } export declare function tests(): { "catches sync error": (assert: any) => void; "return value of callback is forwarded": (assert: any) => void; "catches async error": (assert: any) => Promise; "exception in error callback is swallowed": (assert: any) => Promise; };