import { Observable } from '../../tools/observable'; import type { StackTrace } from '../../tools/stackTrace/computeStackTrace'; import { noop } from '../../tools/utils/functionUtils'; import type { RawError } from './error.types'; export type UnhandledErrorCallback = (originalError: unknown, stackTrace?: StackTrace) => any; export declare function trackRuntimeError(): Observable; export declare function instrumentOnError(callback: UnhandledErrorCallback): { stop: typeof noop; }; export declare function instrumentUnhandledRejection(callback: UnhandledErrorCallback): { stop: typeof noop; };