Skip to content

Commit

Permalink
fix: Restore 'RenderHookOptions' type (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkoops committed Jan 12, 2021
1 parent 10d9a28 commit a334f80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pure.tsx
Expand Up @@ -73,9 +73,14 @@ function resultContainer<TValue>() {
}
}

export interface RenderHookOptions<TProps> {
initialProps?: TProps
wrapper?: React.ComponentType<TProps>
}

function renderHook<TProps, TResult>(
callback: (props: TProps) => TResult,
{ initialProps, wrapper }: { initialProps?: TProps; wrapper?: React.ComponentType<TProps> } = {}
{ initialProps, wrapper }: RenderHookOptions<TProps> = {}
) {
const { result, setValue, setError, addResolver } = resultContainer<TResult>()
const hookProps = { current: initialProps }
Expand Down

0 comments on commit a334f80

Please sign in to comment.