Skip to content

Commit

Permalink
refactor: specify Wrapper type without any
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Apr 25, 2023
1 parent 3f06aab commit 038f41f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ async function measurePerformance(ui: React.ReactElement, options?: MeasureOptio
interface MeasureOptions {
runs?: number;
dropWorst?: number;
wrapper?: React.ComponentType<any>;
wrapper?: React.ComponentType<{ children: ReactElement }>;
scenario?: (view?: RenderResult) => Promise<any>;
}
```
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('Test with scenario', async () => {
interface MeasureOptions {
runs?: number;
dropWorst?: number;
wrapper?: React.ComponentType<any>;
wrapper?: React.ComponentType<{ children: ReactElement }>;
scenario?: (view?: RenderResult) => Promise<any>;
}
```
Expand Down
4 changes: 2 additions & 2 deletions packages/reassure-measure/src/measure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ logger.configure({
export interface MeasureOptions {
runs?: number;
dropWorst?: number;
wrapper?: React.ComponentType<any>;
wrapper?: React.ComponentType<{ children: React.ReactElement }>;
scenario?: (screen: any) => Promise<any>;
}

Expand Down Expand Up @@ -81,7 +81,7 @@ export async function measureRender(ui: React.ReactElement, options?: MeasureOpt
export function buildUiToRender(
ui: React.ReactElement,
onRender: React.ProfilerOnRenderCallback,
Wrapper?: React.ComponentType<any>
Wrapper?: React.ComponentType<{ children: React.ReactElement }>
) {
const uiWithProfiler = (
<React.Profiler id="REASSURE_ROOT" onRender={onRender}>
Expand Down
2 changes: 1 addition & 1 deletion packages/reassure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ async function measurePerformance(ui: React.ReactElement, options?: MeasureOptio
interface MeasureOptions {
runs?: number;
dropWorst?: number;
wrapper?: React.ComponentType<any>;
wrapper?: React.ComponentType<{ children: ReactElement }>;
scenario?: (view?: RenderResult) => Promise<any>;
}
```
Expand Down

0 comments on commit 038f41f

Please sign in to comment.