It also makes refactoring more painful. TypeScript supports callback functions to make your program asynchronous. If you did need information about the mouse click event, this is how you would let TypeScript know about the type of event and the type of element that was clicked. The synchronous callbacks are executed at the same time as the higher-order function that uses the callback. This article shows the same scenario using each of these three techniques so you can see the differences and choose which appeals most to you. The callback is a function that’s accepted as an argument and executed by another function (the higher-order function). return type is the final component definition with proper props and ref types ComponentType

> Now we can use it type-safe way: Forwarding refs in higher-order components typescript callback type; typescript function parameter definition; how to return an