diff --git a/src/source/client/base.js b/src/source/client/base.js index 4abcd4b3..9356eadf 100644 --- a/src/source/client/base.js +++ b/src/source/client/base.js @@ -37,7 +37,8 @@ export class BaseClient { /** * Send a request with the options - * @param {object} [options] + * @param {{headers: HeadersInit, credentials: RequestCredentials, signal: AbortSignal}} [options={}] + * @returns {Promise} */ async request({ headers, credentials, signal } = {}) { // eslint-disable-line no-unused-vars throw new Error('request is not implemented'); diff --git a/src/source/client/fetch.js b/src/source/client/fetch.js index 096c7b20..d7bd1b4a 100644 --- a/src/source/client/fetch.js +++ b/src/source/client/fetch.js @@ -32,6 +32,10 @@ export class FetchClient extends BaseClient { this.credentials = credentials; } + /** + * @param {{headers: HeadersInit, credentials: RequestCredentials, signal: AbortSignal}} [options={}] + * @returns {Promise} + */ async request({ headers, credentials, signal } = {}) { const response = await fetch(this.url, { headers, credentials, signal,