Allows defining a type-safe function requiring all the params of a given hook.
Usage
Even though the syntax looks a bit scary, it’s actually very simple!
-
Call defineUtility
with a hook name. That will be used to type the next steps:
-
Using currying, call the returned function with the typed params:
-
(Optional) Add your own parameters:
-
Implement the actual logic:
-
Use the utility in your integration: