refactor!: better internal type safety for hooks#2995
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2995 +/- ##
=======================================
Coverage ? 72.90%
=======================================
Files ? 67
Lines ? 2185
Branches ? 438
=======================================
Hits ? 1593
Misses ? 392
Partials ? 200 Continue to review full report at Codecov.
|
ca1f41e to
dfcaadc
Compare
dfcaadc to
95afad1
Compare
|
Hey @MarshallOfSound, thanks for changes 👍 or there is a new approach to pass it |
|
@gigantz What do you mean |
|
Check this line. |
When combined with #2993 this makes writing forge configs in typescript a truly wonderful experience. Type hinting for each hook, arg names / types, etc.
If you want me to explain the generics stuff in
shared-typesthat makes it all work you're gonna have to buy me a drink first 😅 .This also changes the internal signature of
Plugin.getHook(name)toPlugin.getHooks().name. This should be considered a breaking change I guess but I've taken the opportunity to update all our built-in plugins to the new syntax.