Skip to content

Commit 1d5717b

Browse files
committed
feat(render): update types
1 parent 795ce09 commit 1d5717b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
},
4848
"devDependencies": {
4949
"@reach/router": "^1.2.1",
50-
"@types/react-dom": "^16.0.9",
50+
"@types/react": "^16.8.3",
51+
"@types/react-dom": "^16.8.2",
5152
"axios": "^0.18.0",
5253
"eslint-import-resolver-jest": "^2.1.1",
5354
"history": "^4.7.2",

typings/index.d.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ export type HookResult<TResult> = {
2525
unmount: () => boolean
2626
}
2727

28-
export type HookOptions = {
29-
wrapper: React.FunctionComponent
30-
}
28+
type WrapperComponent = React.FunctionComponent
3129

3230
export interface RenderOptions<Q extends Queries = typeof queries> {
3331
container?: HTMLElement
3432
baseElement?: HTMLElement
3533
hydrate?: boolean
3634
queries?: Q
35+
wrapper: React.ComponentType
3736
}
3837

38+
export type HookOptions = RenderOptions
39+
3940
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
4041

4142
/**

0 commit comments

Comments
 (0)