Skip to content

Commit

Permalink
Fix ts errors after merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Oct 5, 2023
1 parent b9d212d commit 9436a40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/libs/Performance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ type PerformanceEntriesCallback = (entry: PerformanceEntry) => void;

type Phase = 'mount' | 'update';

type WithRenderTraceHOC = <P extends Record<string, unknown>>(
WrappedComponent: React.ComponentType<P>,
) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<unknown>>;
type WithRenderTraceHOC = <P extends Record<string, unknown>>(WrappedComponent: React.ComponentType<P>) => React.ComponentType<P & React.RefAttributes<unknown>>;

type BlankHOC = <P extends Record<string, unknown>>(Component: React.ComponentType<P>) => React.ComponentType<P>;

Expand Down Expand Up @@ -241,8 +239,8 @@ if (Metrics.canCapturePerformanceMetrics()) {
Performance.withRenderTrace =
({id}: WrappedComponentConfig) =>
// eslint-disable-next-line @typescript-eslint/naming-convention
<P extends Record<string, unknown>>(WrappedComponent: React.ComponentType<P>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<unknown>> => {
const WithRenderTrace = forwardRef((props: P, ref) => (
<P extends Record<string, unknown>>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P & React.RefAttributes<unknown>> => {
const WithRenderTrace: React.ComponentType<P & React.RefAttributes<unknown>> = forwardRef((props: P, ref) => (
<Profiler
id={id}
onRender={Performance.traceRender}
Expand Down

0 comments on commit 9436a40

Please sign in to comment.