Fix return type of withJSX (used to be any)

This commit is contained in:
Jerko Steiner 2019-06-04 14:58:41 +10:00
parent 4b601f93cb
commit 45f0cb76d3

View File

@ -94,7 +94,9 @@ export class TestUtils {
return self
}
const self = {
const self: ISelf<
Props, typeof store, typeof Component, CreateJSX
> = {
render,
store,
Component,
@ -107,3 +109,11 @@ export class TestUtils {
return {withState, withComponent}
}
}
interface ISelf<Props, Store, Component, CreateJSX> {
render: (props: Props) => ReturnType<TestUtils['render']>
store: Store
Component: Component
withJSX: (localCreateJSX: CreateJSX)
=> ISelf<Props, Store, Component, CreateJSX>
}