Skip to content

Commit

Permalink
Update JSDoc commments to appease docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Mar 18, 2022
1 parent ab676a3 commit 1db052f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ _Parameters_

_Returns_

- `WPDataRegistry`: Data registry.
- `DataRegistry`: Data registry.

### createRegistryControl

Expand Down Expand Up @@ -820,8 +820,8 @@ function Paste( { children } ) {

_Parameters_

- _mapSelect_ `Function|StoreDescriptor|string`: Function called on every state change. The returned value is exposed to the component implementing this hook. The function receives the `registry.select` method on the first argument and the `registry` on the second argument. When a store key is passed, all selectors for the store will be returned. This is only meant for usage of these selectors in event callbacks, not for data needed to create the element tree.
- _deps_ `Array`: If provided, this memoizes the mapSelect so the same `mapSelect` is invoked on every state change unless the dependencies change.
- _mapSelect_ `SelectChooser`: Function called on every state change. The returned value is exposed to the component implementing this hook. The function receives the `registry.select` method on the first argument and the `registry` on the second argument. When a store key is passed, all selectors for the store will be returned. This is only meant for usage of these selectors in event callbacks, not for data needed to create the element tree.
- _deps_ `unknown[]`: If provided, this memoizes the mapSelect so the same `mapSelect` is invoked on every state change unless the dependencies change.

_Returns_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { Context } from './context';
* };
* ```
*
* @return A custom react hook exposing the registry context value.
* @return {Function} A custom react hook exposing the registry context value.
*/
export default function useRegistry() {
return useContext( Context );
Expand Down
2 changes: 1 addition & 1 deletion packages/data/src/components/use-select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const renderQueue = createQueue();
* }
* ```
*
* @return A custom react hook.
* @return {Function} A custom react hook.
*/
export default function useSelect(
mapSelect: SelectChooser,
Expand Down

0 comments on commit 1db052f

Please sign in to comment.