Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sccolbert committed Jun 26, 2017
1 parent ecb1594 commit 7d78e82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/datastore/src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@


/**
* An object which represents an action.
* An object which represents an action for a data store.
*
* #### Notes
* Custom actions may implement this interface.
* Actions are dispatched to a data store to change its state.
*/
export
interface IAction {
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore/src/datastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {


/**
* A lightweight data store which largely follows the redux pattern.
* A lightweight data store which mostly follows the redux pattern.
*
* #### Notes
* The `S` type parameter is an interface defining the state shape.
Expand Down
3 changes: 3 additions & 0 deletions packages/datastore/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import {
* @param action - The action to perform on the state.
*
* @returns The new state for the application.
*
* #### Notes
* A reducer processes actions to update the data store state.
*/
export
type Reducer<S, A extends IAction> = (state: S, action: A) => S;

0 comments on commit 7d78e82

Please sign in to comment.