diff --git a/packages/ra-core/src/auth/convertLegacyAuthProvider.ts b/packages/ra-core/src/auth/convertLegacyAuthProvider.ts index 5fe31228802..01030eeb655 100644 --- a/packages/ra-core/src/auth/convertLegacyAuthProvider.ts +++ b/packages/ra-core/src/auth/convertLegacyAuthProvider.ts @@ -12,7 +12,7 @@ import { AuthProvider, LegacyAuthProvider } from '../types'; * * Allows using legacy authProviders transparently. * - * @param {Function} authProvider A legacy authProvider (type, params) => Promise + * @param {Function} legacyAuthProvider A legacy authProvider (type, params) => Promise * * @returns {Object} An authProvider that react-admin can use */ diff --git a/packages/ra-core/src/controller/usePaginationState.ts b/packages/ra-core/src/controller/usePaginationState.ts index 6ae102ab1e3..3952665d73f 100644 --- a/packages/ra-core/src/controller/usePaginationState.ts +++ b/packages/ra-core/src/controller/usePaginationState.ts @@ -47,7 +47,7 @@ const defaultPagination = { * * const { page, setpage, perPage, setPerPage } = usePagination(initialPerPage); * - * @param {numper} initialPerPage the initial value per page + * @param {number} initialPagination the initial value per page * @returns {PaginationProps} The pagination props */ export default ( diff --git a/packages/ra-core/src/dataProvider/Mutation.tsx b/packages/ra-core/src/dataProvider/Mutation.tsx index ab334cdc422..e78e67ac910 100644 --- a/packages/ra-core/src/dataProvider/Mutation.tsx +++ b/packages/ra-core/src/dataProvider/Mutation.tsx @@ -28,6 +28,7 @@ interface Props { /** * Get a callback to call the data provider and pass the result to a child function * + * @param {Function} children Must be a function which will be called with the mutate callback * @param {string} type The method called on the data provider, e.g. 'update', 'delete'. Can also be a custom method if the dataProvider supports is. * @param {string} resource A resource name, e.g. 'posts', 'comments' * @param {Object} payload The payload object, e.g; { id: 12 } diff --git a/packages/ra-core/src/dataProvider/Query.tsx b/packages/ra-core/src/dataProvider/Query.tsx index 6a6f67aca90..2f97e66acdb 100644 --- a/packages/ra-core/src/dataProvider/Query.tsx +++ b/packages/ra-core/src/dataProvider/Query.tsx @@ -20,6 +20,7 @@ interface Props { /** * Fetch the data provider and pass the result to a child function * + * @param {Function} children Must be a function which will be called with an object containing the following keys: data, loading and error * @param {string} type The method called on the data provider, e.g. 'getList', 'getOne'. Can also be a custom method if the dataProvider supports is. * @param {string} resource A resource name, e.g. 'posts', 'comments' * @param {Object} payload The payload object, e.g; { post_id: 12 } diff --git a/packages/ra-core/src/dataProvider/convertLegacyDataProvider.ts b/packages/ra-core/src/dataProvider/convertLegacyDataProvider.ts index bfd7c9db1b3..854944de431 100644 --- a/packages/ra-core/src/dataProvider/convertLegacyDataProvider.ts +++ b/packages/ra-core/src/dataProvider/convertLegacyDataProvider.ts @@ -42,7 +42,7 @@ interface ConvertedDataProvider extends DataProvider { * * Allows using legacy dataProviders transparently. * - * @param {Function} dataProvider A legacy dataProvider (type, resource, params) => Promise + * @param {Function} legacyDataProvider A legacy dataProvider (type, resource, params) => Promise * * @returns {Object} A dataProvider that react-admin can use */ diff --git a/packages/ra-core/src/dataProvider/useGetList.ts b/packages/ra-core/src/dataProvider/useGetList.ts index 1879ecc4e54..c9fa57e31b9 100644 --- a/packages/ra-core/src/dataProvider/useGetList.ts +++ b/packages/ra-core/src/dataProvider/useGetList.ts @@ -17,7 +17,7 @@ import useQueryWithStore from './useQueryWithStore'; * @param {string} resource The resource name, e.g. 'posts' * @param {Object} pagination The request pagination { page, perPage }, e.g. { page: 1, perPage: 10 } * @param {Object} sort The request sort { field, order }, e.g. { field: 'id', order: 'DESC' } - * @param {Object} filters The request filters, e.g. { title: 'hello, world' } + * @param {Object} filter The request filters, e.g. { title: 'hello, world' } * @param {Object} options Options object to pass to the dataProvider. May include side effects to be executed upon success of failure, e.g. { onSuccess: { refresh: true } } * * @returns The current request state. Destructure as { data, total, ids, error, loading, loaded }. diff --git a/packages/ra-core/src/dataProvider/useGetManyReference.ts b/packages/ra-core/src/dataProvider/useGetManyReference.ts index 61950ce1464..5ad2471428a 100644 --- a/packages/ra-core/src/dataProvider/useGetManyReference.ts +++ b/packages/ra-core/src/dataProvider/useGetManyReference.ts @@ -28,7 +28,7 @@ import { useMemo } from 'react'; * @param {Object} id The identifier of the record to look for in 'target' * @param {Object} pagination The request pagination { page, perPage }, e.g. { page: 1, perPage: 10 } * @param {Object} sort The request sort { field, order }, e.g. { field: 'id', order: 'DESC' } - * @param {Object} filters The request filters, e.g. { body: 'hello, world' } + * @param {Object} filter The request filters, e.g. { body: 'hello, world' } * @param {string} referencingResource The resource name, e.g. 'posts'. Used to generate a cache key * @param {Object} options Options object to pass to the dataProvider. May include side effects to be executed upon success of failure, e.g. { onSuccess: { refresh: true } } * diff --git a/packages/ra-core/src/dataProvider/useGetMatching.ts b/packages/ra-core/src/dataProvider/useGetMatching.ts index 54a353bd587..c104caa3e1b 100644 --- a/packages/ra-core/src/dataProvider/useGetMatching.ts +++ b/packages/ra-core/src/dataProvider/useGetMatching.ts @@ -30,7 +30,7 @@ const referenceSource = (resource, source) => `${resource}@${source}`; * @param {string} resource The referenced resource name, e.g. 'tags' * @param {Object} pagination The request pagination { page, perPage }, e.g. { page: 1, perPage: 10 } * @param {Object} sort The request sort { field, order }, e.g. { field: 'id', order: 'DESC' } - * @param {Object} filters The request filters, e.g. { title: 'hello, world' } + * @param {Object} filter The request filters, e.g. { title: 'hello, world' } * @param {string} source The field in resource containing the ids of the referenced records, e.g. 'tag_ids' * @param {string} referencingResource The resource name, e.g. 'posts'. Used to build a cache key * @param {Object} options Options object to pass to the dataProvider. May include side effects to be executed upon success of failure, e.g. { onSuccess: { refresh: true } } diff --git a/packages/ra-core/src/i18n/useSetLocale.tsx b/packages/ra-core/src/i18n/useSetLocale.tsx index 228e373f826..be4d017b635 100644 --- a/packages/ra-core/src/i18n/useSetLocale.tsx +++ b/packages/ra-core/src/i18n/useSetLocale.tsx @@ -9,8 +9,6 @@ import { useNotify } from '../sideEffect'; * * This hook rerenders when the locale changes. * - * @param {string} locale - * * @example * * import { useLocale } from 'react-admin'; diff --git a/packages/ra-core/src/sideEffect/admin.ts b/packages/ra-core/src/sideEffect/admin.ts index a176def4d3f..c538c98f3a2 100644 --- a/packages/ra-core/src/sideEffect/admin.ts +++ b/packages/ra-core/src/sideEffect/admin.ts @@ -11,6 +11,7 @@ import undo from './undo'; /** * @param {Object} dataProvider A Data Provider function + * @param {Function} authProvider An Authentication Provider object */ export default ( dataProvider: DataProvider, diff --git a/packages/ra-core/src/util/renderWithRedux.tsx b/packages/ra-core/src/util/renderWithRedux.tsx index 8c495f0a46c..f45d9839ec1 100644 --- a/packages/ra-core/src/util/renderWithRedux.tsx +++ b/packages/ra-core/src/util/renderWithRedux.tsx @@ -17,7 +17,7 @@ export interface RenderWithReduxResult extends RenderResult { * ); * * @param {ReactNode} component: The component you want to test in jsx - * @param {Object} initialstate: Optional initial state of the redux store + * @param {Object} initialState: Optional initial state of the redux store * @param {Object} options: Render options, e.g. to use a custom container element * @return {{ dispatch, reduxStore, ...rest }} helper function to test rendered component. * Same as @testing-library/react render method with added dispatch and reduxStore helper diff --git a/packages/ra-data-graphql/README.md b/packages/ra-data-graphql/README.md index 0cc63035e4a..56c53c2e7ac 100644 --- a/packages/ra-data-graphql/README.md +++ b/packages/ra-data-graphql/README.md @@ -131,7 +131,7 @@ The introspection result is an object with 4 properties: - `types`: an array of all the GraphQL types discovered on your endpoint - `queries`: an array of all the GraphQL queries and mutations discovered on your endpoint -- `resources`: an array of objects with a `type` property, which is the GraphQL type for this resource, and a property for each react-admin fetch verb for which we found a matching query or mutation +- `resources`: an array of objects with a `type` property, which is the GraphQL type for this resource, and a property for each react-admin fetch verb for which we found a matching query or mutation - `schema`: the full schema For example: diff --git a/packages/ra-tree-language-french/README.md b/packages/ra-tree-language-french/README.md index 93cef61704c..0d40654b693 100644 --- a/packages/ra-tree-language-french/README.md +++ b/packages/ra-tree-language-french/README.md @@ -11,7 +11,7 @@ npm install --save ra-language-french ra-tree-language-french ## Usage ```js -import englishMessages from 'ra-language-french'; +import frenchMessages from 'ra-language-french'; import treeFrenchMessages from 'ra-tree-language-french'; import { mergeTranslations } from 'react-admin';