Extending ky
instance with additional arguments for hooks without affecting other instances (typescript)
#564
Unanswered
kot-shrodingera
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking to create a
ky
instance that can accept additional arguments, which would be accessible in hooks. One approach I've considered is extending theOptions
andNormalizedOptions
interfaces.However, this would affect all other
ky
instances.Is there a way to avoid this while achieving the same functionality? Specifically, I'd like to have autocompletion and type checking when calling any
ky
function (e.g.,.get
,.post
, etc.) with these additional arguments.Any guidance would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions