@zimic/fetch 1.2.9-canary.0 → 1.2.9
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/README.md +2 -2
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
- package/src/client/types/public.ts +3 -3
package/README.md
CHANGED
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
- :muscle: **Developer experience**
|
|
54
54
|
|
|
55
55
|
Define default options to apply to your requests, such as a base URL, headers, search parameters, and more. Inspect
|
|
56
|
-
and modify requests and responses using [`onRequest`](https://zimic.dev/docs/fetch/api/fetch#
|
|
57
|
-
[`onResponse`](https://zimic.dev/docs/fetch/api/fetch#
|
|
56
|
+
and modify requests and responses using [`onRequest`](https://zimic.dev/docs/fetch/api/fetch#fetchonrequest) and
|
|
57
|
+
[`onResponse`](https://zimic.dev/docs/fetch/api/fetch#fetchonresponse) listeners.
|
|
58
58
|
|
|
59
59
|
**Learn more**:
|
|
60
60
|
|
package/dist/index.d.ts
CHANGED
|
@@ -290,11 +290,11 @@ interface Fetch<Schema extends HttpSchema> extends Pick<FetchOptions<Schema>, 'o
|
|
|
290
290
|
loose: Fetch.Loose;
|
|
291
291
|
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchrequest `fetch.Request`} */
|
|
292
292
|
Request: FetchRequestConstructor<Schema>;
|
|
293
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
293
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisrequest `fetch.isRequest`} */
|
|
294
294
|
isRequest: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(request: unknown, method: Method, path: Path) => request is FetchRequest<Schema, Method, Path>;
|
|
295
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
295
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisresponse `fetch.isResponse`} */
|
|
296
296
|
isResponse: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(response: unknown, method: Method, path: Path) => response is FetchResponse<Schema, Method, Path>;
|
|
297
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
297
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisresponseerror `fetch.isResponseError`} */
|
|
298
298
|
isResponseError: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(error: unknown, method: Method, path: Path) => error is FetchResponseError<Schema, Method, Path>;
|
|
299
299
|
}
|
|
300
300
|
declare namespace Fetch {
|
package/package.json
CHANGED
|
@@ -47,21 +47,21 @@ export interface Fetch<Schema extends HttpSchema>
|
|
|
47
47
|
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchrequest `fetch.Request`} */
|
|
48
48
|
Request: FetchRequestConstructor<Schema>;
|
|
49
49
|
|
|
50
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
50
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisrequest `fetch.isRequest`} */
|
|
51
51
|
isRequest: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(
|
|
52
52
|
request: unknown,
|
|
53
53
|
method: Method,
|
|
54
54
|
path: Path,
|
|
55
55
|
) => request is FetchRequest<Schema, Method, Path>;
|
|
56
56
|
|
|
57
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
57
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisresponse `fetch.isResponse`} */
|
|
58
58
|
isResponse: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(
|
|
59
59
|
response: unknown,
|
|
60
60
|
method: Method,
|
|
61
61
|
path: Path,
|
|
62
62
|
) => response is FetchResponse<Schema, Method, Path>;
|
|
63
63
|
|
|
64
|
-
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#
|
|
64
|
+
/** @see {@link https://zimic.dev/docs/fetch/api/fetch#fetchisresponseerror `fetch.isResponseError`} */
|
|
65
65
|
isResponseError: <Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath.Literal<Schema, Method>>(
|
|
66
66
|
error: unknown,
|
|
67
67
|
method: Method,
|