@prismicio/client 6.7.0 → 6.7.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/dist/index.d.ts +8 -8
- package/package.json +1 -1
- package/src/types.ts +13 -15
package/dist/index.d.ts
CHANGED
|
@@ -94,19 +94,19 @@ declare type FetchLike = (input: string, init?: RequestInitLike) => Promise<Resp
|
|
|
94
94
|
*
|
|
95
95
|
* {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}
|
|
96
96
|
*/
|
|
97
|
-
declare type AbortSignalLike =
|
|
98
|
-
aborted: any;
|
|
99
|
-
addEventListener: any;
|
|
100
|
-
removeEventListener: any;
|
|
101
|
-
dispatchEvent: any;
|
|
102
|
-
onabort: any;
|
|
103
|
-
};
|
|
97
|
+
declare type AbortSignalLike = any;
|
|
104
98
|
/**
|
|
105
99
|
* The minimum required properties from RequestInit.
|
|
106
100
|
*/
|
|
107
101
|
interface RequestInitLike {
|
|
108
102
|
headers?: Record<string, string>;
|
|
109
|
-
|
|
103
|
+
/**
|
|
104
|
+
* An object that allows you to abort a `fetch()` request if needed via an
|
|
105
|
+
* `AbortController` object
|
|
106
|
+
*
|
|
107
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}
|
|
108
|
+
*/
|
|
109
|
+
signal?: AbortSignalLike;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* The minimum required properties from Response.
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -68,27 +68,25 @@ export type FetchLike = (
|
|
|
68
68
|
// different AbortSignal implementations. The types of each property are not
|
|
69
69
|
// important to validate since it is blindly passed to a given `fetch()`
|
|
70
70
|
// function.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
aborted: any;
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
-
addEventListener: any;
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
-
removeEventListener: any;
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
-
dispatchEvent: any;
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
-
onabort: any;
|
|
82
|
-
};
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
+
export type AbortSignalLike = any;
|
|
83
73
|
|
|
84
74
|
/**
|
|
85
75
|
* The minimum required properties from RequestInit.
|
|
86
76
|
*/
|
|
87
77
|
export interface RequestInitLike {
|
|
88
78
|
headers?: Record<string, string>;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* An object that allows you to abort a `fetch()` request if needed via an
|
|
82
|
+
* `AbortController` object
|
|
83
|
+
*
|
|
84
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}
|
|
85
|
+
*/
|
|
86
|
+
// NOTE: `AbortSignalLike` is `any`! It is left as `AbortSignalLike`
|
|
87
|
+
// for backwards compatibility (the type is exported) and to signal to
|
|
88
|
+
// other readers that this should be an AbortSignal-like object.
|
|
89
|
+
signal?: AbortSignalLike;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
/**
|