refacto : cleaning the codebasebase again
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
type Listener<TPayload> = (payload: TPayload) => void;
|
||||
|
||||
// TypeScript cannot narrow mapped-type indexed access by a generic key TKey
|
||||
// (microsoft/TypeScript#30581). The helper below encapsulates the one necessary
|
||||
// cast so the rest of the class stays cast-free.
|
||||
type ListenerMap<TEvents extends Record<string, unknown>> = {
|
||||
[TKey in keyof TEvents]?: Set<Listener<TEvents[TKey]>>;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Suspense, lazy } from "react";
|
||||
import { lazy } from "react";
|
||||
import { Debug } from "@/utils/debug/Debug";
|
||||
|
||||
const Perf = lazy(() => import("r3f-perf").then((m) => ({ default: m.Perf })));
|
||||
@@ -10,9 +10,5 @@ export function DebugPerf(): React.JSX.Element | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={null}>
|
||||
<Perf position="bottom-right" />
|
||||
</Suspense>
|
||||
);
|
||||
return <Perf position="bottom-right" />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user