Repository navigation
Replies: 2 comments 2 replies
|
If you're on Bun >= 1.2.7 and your project is using Bun's types, this may already be fixed without any If you want to avoid project-wide augmentation, there isn't a cleaner local TypeScript escape hatch than a small wrapper or a one-off cast. |
|

Uh oh!
There was an error while loading. Please reload this page.
I'm using
kyto make HTTP requests in Bun, but I'm getting a TypeScript error stating thatproxycannot be specified in theOptionsobject.While the proxy actually works perfectly at runtime thanks to a previous fix, my IDE still flags it as a type error. I'd like to find the optimal solution for this issue.
The only workarounds I could come up with were either modifying the package to use the
fetchtypes injected intoglobalThis, or explicitly augmentingky's types.Currently, I've created the following declaration file to make TypeScript recognize the property. Is there a better approach?
types/ky.d.tsAll reactions