Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/content-helper/common/providers/base-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,17 @@ export abstract class BaseProvider {
*
* @since 3.15.0
*
* @param {APIFetchOptions} options The options to pass to apiFetch.
* @param {string?} id The (optional) ID of the request.
* @param {APIFetchOptions<true>} options The options to pass to apiFetch.
* @param {string?} id The (optional) ID of the request.
*
* @return {Promise<ContentHelperAPIResponse<any>>} The fetched data.
*/
protected async fetch<T>( options: APIFetchOptions, id?: string ): Promise<T> {
protected async fetch<T>( options: APIFetchOptions<true>, id?: string ): Promise<T> {
const { abortController, abortId } = this.getOrCreateController( id );
options.signal = abortController.signal;

try {
const response = await apiFetch<ContentHelperAPIResponse<T>>( options as APIFetchOptions<true> );
const response = await apiFetch<ContentHelperAPIResponse<T>>( options );

// Validate API side errors.
if ( response.error ) {
Expand Down
Loading