Skip to content

Commit 919f7c6

Browse files
authored
fix: Do not infer generic Props type from RenderHookOptions (#1816)
1 parent 6ee46e6 commit 919f7c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/render-hook.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type RenderHookOptions<Props> = {
3838

3939
export function renderHook<Result, Props>(
4040
hookToRender: (props: Props) => Result,
41-
options?: RenderHookOptions<Props>,
41+
options?: RenderHookOptions<NoInfer<Props>>,
4242
): RenderHookResult<Result, Props> {
4343
const result = React.createRef<Result>() as RefObject<Result>;
4444

@@ -67,7 +67,7 @@ export function renderHook<Result, Props>(
6767

6868
export async function renderHookAsync<Result, Props>(
6969
hookToRender: (props: Props) => Result,
70-
options?: RenderHookOptions<Props>,
70+
options?: RenderHookOptions<NoInfer<Props>>,
7171
): Promise<RenderHookAsyncResult<Result, Props>> {
7272
const result = React.createRef<Result>() as RefObject<Result>;
7373

0 commit comments

Comments
 (0)