Files
decky-frontend-lib/src/components/ErrorBoundary.ts

6 lines
319 B
TypeScript
Raw Normal View History

import { FC, PropsWithChildren } from "react";
2024-06-27 00:06:00 -04:00
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