From cd44d0f220e80c185c7787b7ffb5d79049a5dff0 Mon Sep 17 00:00:00 2001 From: LucsT Date: Fri, 17 Mar 2023 18:01:40 +0100 Subject: [PATCH] fix: Fix jsdocs in queryAll --- docs/api/cozy-client/classes/CozyClient.md | 4 ++-- packages/cozy-client/src/CozyClient.js | 2 +- packages/cozy-client/types/CozyClient.d.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/cozy-client/classes/CozyClient.md b/docs/api/cozy-client/classes/CozyClient.md index 22e902acbb..3a2349f736 100644 --- a/docs/api/cozy-client/classes/CozyClient.md +++ b/docs/api/cozy-client/classes/CozyClient.md @@ -1310,7 +1310,7 @@ executes its query when mounted if no fetch policy has been indicated. ### queryAll -▸ **queryAll**(`queryDefinition`, `options?`): `Promise`<`any`> +▸ **queryAll**(`queryDefinition`, `options?`): `Promise`<`CozyClientDocument`\[]> Will fetch all documents for a `queryDefinition`, automatically fetching more documents if the total of documents is superior to the pagination limit. Can @@ -1325,7 +1325,7 @@ result in a lot of network requests. *Returns* -`Promise`<`any`> +`Promise`<`CozyClientDocument`\[]> All documents matching the query diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js index 118b94a866..cbbe3b92c6 100644 --- a/packages/cozy-client/src/CozyClient.js +++ b/packages/cozy-client/src/CozyClient.js @@ -994,7 +994,7 @@ client.query(Q('io.cozy.bills'))`) * * @param {QueryDefinition} queryDefinition - Definition to be executed * @param {QueryOptions} [options] - Options - * @returns {Promise} All documents matching the query + * @returns {Promise} All documents matching the query */ async queryAll(queryDefinition, options = {}) { const queryId = diff --git a/packages/cozy-client/types/CozyClient.d.ts b/packages/cozy-client/types/CozyClient.d.ts index 0f202409e8..2072584dbe 100644 --- a/packages/cozy-client/types/CozyClient.d.ts +++ b/packages/cozy-client/types/CozyClient.d.ts @@ -426,9 +426,9 @@ declare class CozyClient { * * @param {QueryDefinition} queryDefinition - Definition to be executed * @param {QueryOptions} [options] - Options - * @returns {Promise} All documents matching the query + * @returns {Promise} All documents matching the query */ - queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise; + queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise; watchQuery(...args: any[]): ObservableQuery; makeObservableQuery(queryDefinition: any, options?: {}): ObservableQuery; /**