fix(errorboundary): work around broken react types

for the billionth time
This commit is contained in:
AAGaming
2024-06-27 00:16:14 -04:00
parent 0da85355c2
commit 3ef9648355

View File

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