@superutils/fetch 1.1.6 → 1.1.7
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -274,7 +274,7 @@ type FetchRetryOptions = Omit<Partial<RetryOptions>, 'retry' | 'retryIf'> & {
|
|
|
274
274
|
/**
|
|
275
275
|
* Generic fetch interceptor type
|
|
276
276
|
*/
|
|
277
|
-
type Interceptor<T, TArgs extends unknown[]
|
|
277
|
+
type Interceptor<T, TArgs extends unknown[]> = (...args: [value: T, ...TArgs]) => ValueOrPromise<void> | ValueOrPromise<T>;
|
|
278
278
|
type PostBody = Record<string, unknown> | BodyInit | null;
|
|
279
279
|
type PostArgs<OmitMethod = false> = [
|
|
280
280
|
url: string | URL,
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var executeInterceptors = async (value, interceptors, ...args) => {
|
|
|
16
16
|
for (const interceptor of interceptors.filter(isFn)) {
|
|
17
17
|
value = (_a = await fallbackIfFails(
|
|
18
18
|
interceptor,
|
|
19
|
-
[value, args],
|
|
19
|
+
[value, ...args],
|
|
20
20
|
void 0
|
|
21
21
|
)) != null ? _a : value;
|
|
22
22
|
}
|
package/package.json
CHANGED