Skip to content

Commit a334f80

Browse files
authored
fix: Restore 'RenderHookOptions' type (#535)
1 parent 10d9a28 commit a334f80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pure.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,14 @@ function resultContainer<TValue>() {
7373
}
7474
}
7575

76+
export interface RenderHookOptions<TProps> {
77+
initialProps?: TProps
78+
wrapper?: React.ComponentType<TProps>
79+
}
80+
7681
function renderHook<TProps, TResult>(
7782
callback: (props: TProps) => TResult,
78-
{ initialProps, wrapper }: { initialProps?: TProps; wrapper?: React.ComponentType<TProps> } = {}
83+
{ initialProps, wrapper }: RenderHookOptions<TProps> = {}
7984
) {
8085
const { result, setValue, setError, addResolver } = resultContainer<TResult>()
8186
const hookProps = { current: initialProps }

0 commit comments

Comments
 (0)