diff --git a/package-lock.json b/package-lock.json index a9ed939..be86e6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wretch", - "version": "2.4.1", + "version": "2.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wretch", - "version": "2.4.1", + "version": "2.5.1", "license": "MIT", "devDependencies": { "@fastify/basic-auth": "^4.0.0", diff --git a/src/types.ts b/src/types.ts index 6e9b1d5..6a15890 100644 --- a/src/types.ts +++ b/src/types.ts @@ -281,7 +281,7 @@ export interface Wretch { * @param errorId - Error code or name * @param catcher - The catcher method */ - catcher(this: Self & Wretch, errorId: number | string, catcher: (error: WretchError, originalRequest: Wretch) => any): this + catcher(this: Self & Wretch, errorId: number | string, catcher: (error: WretchError, originalRequest: this) => any): this /** * Defer one or multiple request chain methods that will get called just before the request is sent. @@ -358,7 +358,7 @@ export interface Wretch { Clear extends true ? Chain & WretchResponseChain : Resolver, - originalRequest: Wretch + originalRequest: Self & Wretch ) => ResolverReturn, clear?: Clear ): Self & Wretch