This pattern is never going to look and feel very ergonomic in ReScript given the different semantics, but if you really need to support it and are fine with it being slightly awkward, you can add an identity cast to a separately defined function type. Notice asCallable and callable here: ReScript Playground
↧
How to bind this kind of function?
↧