@superutils/fetch 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare class FetchError extends Error {
|
|
|
84
84
|
* // Interceptors can be async functions or just return a promise that resolves to the error.
|
|
85
85
|
* // If the execution of the interceptor fails or promise rejects, it will be ignored.
|
|
86
86
|
* // To transform the error it must directly return an error or a Promise that `resolves` with an error.
|
|
87
|
-
* const transformError = async fetchErr => {
|
|
87
|
+
* const transformError = async (fetchErr, url, options) => {
|
|
88
88
|
* fetchErr.message = 'Custom errormessage'
|
|
89
89
|
* return Promise.resolve(fetchErr)
|
|
90
90
|
* }
|
|
@@ -95,7 +95,7 @@ declare class FetchError extends Error {
|
|
|
95
95
|
* })
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
type FetchInterceptorError = Interceptor<FetchError,
|
|
98
|
+
type FetchInterceptorError = Interceptor<FetchError, FetchArgsInterceptor>;
|
|
99
99
|
/**
|
|
100
100
|
*
|
|
101
101
|
* Fetch request interceptor to be invoked before making a fetch request.
|
package/package.json
CHANGED