Skip to content

Commit

Permalink
refactor: simplify type of Renderhook options
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrezimmermann committed Jun 29, 2023
1 parent f6e8371 commit c5d1e47
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/renderHook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ export type RenderHookResult<Result, Props> = {
unmount: () => void;
};

export type RenderHookOptions<Props> =
| {
initialProps?: Props;
wrapper?: ComponentType<any>;
}
| undefined;
export type RenderHookOptions<Props> = {
initialProps?: Props;
wrapper?: ComponentType<any>;
};

export function renderHook<Result, Props>(
renderCallback: (props: Props) => Result,
Expand Down

0 comments on commit c5d1e47

Please sign in to comment.