Skip to content

Explicit type for hook implementations#185

Open
h2570su wants to merge 3 commits intogo-viper:mainfrom
h2570su:feat/explict-type-for-hook
Open

Explicit type for hook implementations#185
h2570su wants to merge 3 commits intogo-viper:mainfrom
h2570su:feat/explict-type-for-hook

Conversation

@h2570su
Copy link
Copy Markdown

@h2570su h2570su commented Mar 25, 2026

Current DecodeHookFunc is any for various implementations of hooks, but could produce some runtime bugs by passing in some wrong function signature.

Maybe recommending passing in an explicit defined one is a good idea?

This PR doesn't change current accepts args, just let converting to DecodeHookFuncValue of each type of hook function implement itself, and allows custom signatures of hook function (with restriction)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant