I'm using typescript and react-apollo
If I remove the last (Index)
the error will go away but I have no idea on how then export the container/component.
Basically, the code works but typescript is not happy with this.
I'm using typescript and react-apollo
If I remove the last (Index)
the error will go away but I have no idea on how then export the container/component.
Basically, the code works but typescript is not happy with this.
Imprecisely defining compose
parameters as any
will satisfy the compiler.
export default compose<any>(
...
)(Index)
For others struggling with a similar issue.
Defining a separate generic compose function also will work and can then just be invoked immediately without issue.
const invokableCompose = <any>compose;
export default invokeableCompose(fn1, fn2)(Index);