Skip to content

Commit

Permalink
Data: Documentation: Document undocumented declarations (#15176)
Browse files Browse the repository at this point in the history
* Data: Documentation: Document plugins

* Data: Documentation: Document use
  • Loading branch information
aduth authored May 31, 2019
1 parent 0643823 commit 04ca6b4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
18 changes: 16 additions & 2 deletions packages/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,15 @@ _Returns_

<a name="plugins" href="#plugins">#</a> **plugins**

Undocumented declaration.
Object of available plugins to use with a registry.

_Related_

- [use](#use)

_Type_

- `Object`

<a name="registerGenericStore" href="#registerGenericStore">#</a> **registerGenericStore**

Expand Down Expand Up @@ -470,7 +478,13 @@ _Parameters_

<a name="use" href="#use">#</a> **use**

Undocumented declaration.
Extends a registry to inherit functionality provided by a given plugin. A
plugin is an object with properties aligning to that of a registry, merged
to extend the default registry behavior.

_Parameters_

- _plugin_ `Object`: Plugin object.

<a name="useRegistry" href="#useRegistry">#</a> **useRegistry**

Expand Down
18 changes: 17 additions & 1 deletion packages/data/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ export {
AsyncModeProvider as __experimentalAsyncModeProvider,
} from './components/async-mode-provider';
export { createRegistry } from './registry';
export { plugins };
export { createRegistrySelector, createRegistryControl } from './factory';

/**
* Object of available plugins to use with a registry.
*
* @see [use](#use)
*
* @type {Object}
*/
export { plugins };

/**
* The combineReducers helper function turns an object whose values are different
* reducing functions into a single reducing function you can pass to registerReducer.
Expand Down Expand Up @@ -140,4 +148,12 @@ export const registerGenericStore = defaultRegistry.registerGenericStore;
* @return {Object} Registered store object.
*/
export const registerStore = defaultRegistry.registerStore;

/**
* Extends a registry to inherit functionality provided by a given plugin. A
* plugin is an object with properties aligning to that of a registry, merged
* to extend the default registry behavior.
*
* @param {Object} plugin Plugin object.
*/
export const use = defaultRegistry.use;

0 comments on commit 04ca6b4

Please sign in to comment.