export type NextErrorFeedEvent = { kind: "rootCaught"; error: unknown; } | { kind: "error"; origin: "runtime" | "recoverable" | "console"; error: Error; } | { kind: "rejection"; error: Error; }; type NextErrorFeedListener = (event: NextErrorFeedEvent) => void; type NextErrorFeedState = { listener: NextErrorFeedListener | null; dispose: () => void; }; declare global { interface Window { __reploNextErrorFeed?: NextErrorFeedState; } } /** * Routes Next's error feed to `listener`, replacing any previous listener. * The subscriber lives in its own detached React root so it outlives a root * failure of the page tree and never unmounts: unmounting `useErrorHandler` * clears Next's shared error queues. */ export declare function installNextErrorFeed(listener: NextErrorFeedListener): void; export declare function resetNextErrorFeedForTests(): void; export {};