Skip to content

Commit

Permalink
docs: Fix dictionary typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien DUMONT authored and paultranvan committed Oct 9, 2024
1 parent d4e710d commit 8626cf7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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 @@ -1641,8 +1641,8 @@ save the new resulting settings into database
| Name | Type | Description |
| :------ | :------ | :------ |
| `slug` | `string` | the cozy-app's slug containing the setting (can be 'instance' for global settings) |
| `itemsOrSetter` | `Record`<`string`, `any`> | (`oldValue`: `any`) => `Record`<`T`, `any`> | The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary |
| `setterKeys` | `T`\[] | The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary |
| `itemsOrSetter` | `Record`<`string`, `any`> | (`oldValue`: `any`) => `Record`<`T`, `any`> | The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary |
| `setterKeys` | `T`\[] | The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary |

*Returns*

Expand Down
4 changes: 2 additions & 2 deletions packages/cozy-client/src/CozyClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1846,8 +1846,8 @@ instantiation of the client.`
* @template {string} T
*
* @param {string} slug - the cozy-app's slug containing the setting (can be 'instance' for global settings)
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @returns {Promise<any>} - The result of the `client.save()` call
*/
async saveAfterFetchSettings(slug, itemsOrSetter, setterKeys) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cozy-client/src/helpers/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const getSettings = async (client, slug, keys) => {
*
* @param {CozyClient} client - Cozy client instance
* @param {string} slug - the cozy-app's slug containing the setting (special cases are: 'instance' for global settings and 'bitwarden' for cozy-pass)
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @returns {Promise<any>} - The result of the `client.save()` call
*/
export const saveAfterFetchSettings = async (
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 @@ -798,8 +798,8 @@ declare class CozyClient {
* @template {string} T
*
* @param {string} slug - the cozy-app's slug containing the setting (can be 'instance' for global settings)
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionnary, or a callback that should return a new dictionnary
* @param {Record<string, any> | ((oldValue) => Record<T, any>)} itemsOrSetter - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @param {T[]=} setterKeys - The new values of the settings to save. It can be a raw dictionary, or a callback that should return a new dictionary
* @returns {Promise<any>} - The result of the `client.save()` call
*/
saveAfterFetchSettings<T_2 extends string>(slug: string, itemsOrSetter: Record<string, any> | ((oldValue: any) => Record<T_2, any>), setterKeys?: T_2[]): Promise<any>;
Expand Down

0 comments on commit 8626cf7

Please sign in to comment.