Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix jsdocs in queryAll #1333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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