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 JSDocs errors. #3829

Merged
merged 5 commits into from
Oct 17, 2019
Merged
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
2 changes: 1 addition & 1 deletion packages/ra-core/src/auth/convertLegacyAuthProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { AuthProvider, LegacyAuthProvider } from '../types';
*
* Allows using legacy authProviders transparently.
*
* @param {Function} authProvider A legacy authProvider (type, params) => Promise<any>
* @param {Function} legacyAuthProvider A legacy authProvider (type, params) => Promise<any>
*
* @returns {Object} An authProvider that react-admin can use
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/controller/usePaginationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions packages/ra-core/src/dataProvider/Mutation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/ra-core/src/dataProvider/Query.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface ConvertedDataProvider extends DataProvider {
*
* Allows using legacy dataProviders transparently.
*
* @param {Function} dataProvider A legacy dataProvider (type, resource, params) => Promise<any>
* @param {Function} legacyDataProvider A legacy dataProvider (type, resource, params) => Promise<any>
*
* @returns {Object} A dataProvider that react-admin can use
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/dataProvider/useGetList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }.
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/dataProvider/useGetManyReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
*
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/dataProvider/useGetMatching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
Expand Down
2 changes: 0 additions & 2 deletions packages/ra-core/src/i18n/useSetLocale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { useNotify } from '../sideEffect';
*
* This hook rerenders when the locale changes.
*
* @param {string} locale
*
* @example
*
* import { useLocale } from 'react-admin';
Expand Down
1 change: 1 addition & 0 deletions packages/ra-core/src/sideEffect/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/util/renderWithRedux.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-data-graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-tree-language-french/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down