Skip to content

Commit 3de1f7c

Browse files
authored
Merge pull request #3876 from Parsely/copilot/fix-build-errors-in-develop
2 parents 69ce0b0 + e8a1504 commit 3de1f7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content-helper/common/providers/base-provider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ export abstract class BaseProvider {
138138
*
139139
* @since 3.15.0
140140
*
141-
* @param {APIFetchOptions} options The options to pass to apiFetch.
142-
* @param {string?} id The (optional) ID of the request.
141+
* @param {APIFetchOptions<true>} options The options to pass to apiFetch.
142+
* @param {string?} id The (optional) ID of the request.
143143
*
144144
* @return {Promise<ContentHelperAPIResponse<any>>} The fetched data.
145145
*/
146-
protected async fetch<T>( options: APIFetchOptions, id?: string ): Promise<T> {
146+
protected async fetch<T>( options: APIFetchOptions<true>, id?: string ): Promise<T> {
147147
const { abortController, abortId } = this.getOrCreateController( id );
148148
options.signal = abortController.signal;
149149

150150
try {
151-
const response = await apiFetch<ContentHelperAPIResponse<T>>( options as APIFetchOptions<true> );
151+
const response = await apiFetch<ContentHelperAPIResponse<T>>( options );
152152

153153
// Validate API side errors.
154154
if ( response.error ) {

0 commit comments

Comments
 (0)