Skip to content

Commit

Permalink
fix: Fix jsdocs in queryAll
Browse files Browse the repository at this point in the history
  • Loading branch information
LucsT committed Mar 17, 2023
1 parent 541ab7c commit cd44d0f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/api/cozy-client/classes/CozyClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -1325,7 +1325,7 @@ result in a lot of network requests.

*Returns*

`Promise`<`any`>
`Promise`<`CozyClientDocument`\[]>

All documents matching the query

Expand Down
2 changes: 1 addition & 1 deletion packages/cozy-client/src/CozyClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ client.query(Q('io.cozy.bills'))`)
*
* @param {QueryDefinition} queryDefinition - Definition to be executed
* @param {QueryOptions} [options] - Options
* @returns {Promise<QueryResult>} All documents matching the query
* @returns {Promise<CozyClientDocument[]>} All documents matching the query
*/
async queryAll(queryDefinition, options = {}) {
const queryId =
Expand Down
4 changes: 2 additions & 2 deletions packages/cozy-client/types/CozyClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ declare class CozyClient {
*
* @param {QueryDefinition} queryDefinition - Definition to be executed
* @param {QueryOptions} [options] - Options
* @returns {Promise<QueryResult>} All documents matching the query
* @returns {Promise<CozyClientDocument[]>} All documents matching the query
*/
queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise<QueryResult>;
queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise<CozyClientDocument[]>;
watchQuery(...args: any[]): ObservableQuery;
makeObservableQuery(queryDefinition: any, options?: {}): ObservableQuery;
/**
Expand Down

0 comments on commit cd44d0f

Please sign in to comment.