Skip to content

Commit 02272d4

Browse files
committed
Export options and result types for renderHook
1 parent 11f3492 commit 02272d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/renderHook.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ import React from 'react';
22
import type { ComponentType } from 'react';
33
import render from './render';
44

5-
interface RenderHookResult<Result, Props> {
5+
export interface RenderHookResult<Result, Props> {
66
rerender: (props: Props) => void;
77
result: { current: Result };
88
unmount: () => void;
99
}
1010

11-
type RenderHookOptions<Props> = Props extends object | string | number | boolean
11+
export type RenderHookOptions<Props> = Props extends
12+
| object
13+
| string
14+
| number
15+
| boolean
1216
? {
1317
initialProps: Props;
1418
wrapper?: ComponentType<any>;

0 commit comments

Comments
 (0)