Skip to content

Commit c5d1e47

Browse files
author
pierrezimmermann
committed
refactor: simplify type of Renderhook options
1 parent f6e8371 commit c5d1e47

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/renderHook.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ export type RenderHookResult<Result, Props> = {
88
unmount: () => void;
99
};
1010

11-
export type RenderHookOptions<Props> =
12-
| {
13-
initialProps?: Props;
14-
wrapper?: ComponentType<any>;
15-
}
16-
| undefined;
11+
export type RenderHookOptions<Props> = {
12+
initialProps?: Props;
13+
wrapper?: ComponentType<any>;
14+
};
1715

1816
export function renderHook<Result, Props>(
1917
renderCallback: (props: Props) => Result,

0 commit comments

Comments
 (0)