by Brakenshire · 10y ago · 0 comments
As an example, to see what I mean, try to figure out how to write a properly typed Higher Order Component function. Last time I looked at it, this had no direct mention in documentation and only workarounds on StackOverflow.
export var hocFunction: (arg1: any, arg2: any) => <ComponentT>(component: ComponentT) => ComponentT
If you want to add new props as a result of the HOC then see the react-redux .d.ts for a few examples: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...