Files
decky-frontend-lib/src/components/ErrorBoundary.ts
2024-06-27 00:16:14 -04:00

6 lines
319 B
TypeScript

import { FC, PropsWithChildren } from "react";
import { findModuleExport } from "../webpack";
export const ErrorBoundary = findModuleExport(
(e) => e.InstallErrorReportingStore && e?.prototype?.Reset && e?.prototype?.componentDidCatch,
) as FC<PropsWithChildren>; // Actually a class but @types/react is broken lol