@ngxsp/adapter-http-fetch 0.2.0 → 0.2.1
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/index.d.ts +5 -7
- package/package.json +1 -1
- package/index.d.cts +0 -17
package/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
type FetchLike = typeof fetch;
|
|
2
|
-
interface HttpRequestInterceptor {
|
|
1
|
+
export type FetchLike = typeof fetch;
|
|
2
|
+
export interface HttpRequestInterceptor {
|
|
3
3
|
(input: RequestInfo | URL, init: RequestInit): Promise<[RequestInfo | URL, RequestInit]> | [RequestInfo | URL, RequestInit];
|
|
4
4
|
}
|
|
5
|
-
interface HttpResponseInterceptor {
|
|
5
|
+
export interface HttpResponseInterceptor {
|
|
6
6
|
(response: Response): Promise<Response> | Response;
|
|
7
7
|
}
|
|
8
|
-
interface HttpAdapterOptions {
|
|
8
|
+
export interface HttpAdapterOptions {
|
|
9
9
|
timeoutMs?: number;
|
|
10
10
|
requestInterceptors?: HttpRequestInterceptor[];
|
|
11
11
|
responseInterceptors?: HttpResponseInterceptor[];
|
|
12
12
|
}
|
|
13
|
-
declare function createFetchHttpAdapter(opts?: HttpAdapterOptions): {
|
|
13
|
+
export declare function createFetchHttpAdapter(opts?: HttpAdapterOptions): {
|
|
14
14
|
fetch: typeof fetch;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
export { type FetchLike, type HttpAdapterOptions, type HttpRequestInterceptor, type HttpResponseInterceptor, createFetchHttpAdapter };
|
package/package.json
CHANGED
package/index.d.cts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type FetchLike = typeof fetch;
|
|
2
|
-
interface HttpRequestInterceptor {
|
|
3
|
-
(input: RequestInfo | URL, init: RequestInit): Promise<[RequestInfo | URL, RequestInit]> | [RequestInfo | URL, RequestInit];
|
|
4
|
-
}
|
|
5
|
-
interface HttpResponseInterceptor {
|
|
6
|
-
(response: Response): Promise<Response> | Response;
|
|
7
|
-
}
|
|
8
|
-
interface HttpAdapterOptions {
|
|
9
|
-
timeoutMs?: number;
|
|
10
|
-
requestInterceptors?: HttpRequestInterceptor[];
|
|
11
|
-
responseInterceptors?: HttpResponseInterceptor[];
|
|
12
|
-
}
|
|
13
|
-
declare function createFetchHttpAdapter(opts?: HttpAdapterOptions): {
|
|
14
|
-
fetch: typeof fetch;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { type FetchLike, type HttpAdapterOptions, type HttpRequestInterceptor, type HttpResponseInterceptor, createFetchHttpAdapter };
|