Bekacru / better-fetch

Advanced fetch wrapper for typescript
https://better-fetch.vercel.app/
227 stars 7 forks source link

Adding logger plugin breaks types #6

Closed OwenVey closed 4 months ago

OwenVey commented 4 months ago

When I add plugins: [logger()] to my export const $fetch = createFetch({...}) object, it seems to break the types when using the $fetch() function. I get an Argument of type 'string' is not assignable to parameter of type 'never'.ts(2345) error on the path I'm passing to it and no intellisense on the rest of the function properties.

Screenshot 2024-07-25 at 04 34 12 PM

Everything goes back to working when i comment out the plugins: [logger()] line. Let me know if you'd like any more details.

Bekacru commented 4 months ago

Hey, if you're on the latest version (v1.1.1), this should be fixed. Let me know if it's still an issue.

OwenVey commented 4 months ago

Upgraded from 1.1.1 to 1.1.2 and issue is no longer present, thanks!