Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit ea41044

Browse files
committed
docs(readme): Updates usage.
1 parent 9445966 commit ea41044

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

readme.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
### Id and Entity Interface
1313

1414
```ts
15-
export interface TodoId {
16-
readonly id: string;
17-
}
15+
import Entity from '@js-entity-repos/core/dist/types/Entity';
1816

19-
export interface TodoEntity extends TodoId {
17+
export interface TodoEntity extends Entity {
2018
readonly description: string;
2119
readonly completed: boolean;
2220
}
@@ -33,9 +31,10 @@ interface State {
3331

3432
const state: State = { todos: [] };
3533
const todoFacadeConfig: FacadeConfig = {
34+
defaultPaginationLimit: 100,
35+
entityName: 'todo',
3636
getEntities: () => state.todos,
3737
setEntities: (todos) => state.todos = todos,
38-
entityName: 'todo',
3938
};
4039
```
4140

@@ -44,5 +43,5 @@ const todoFacadeConfig: FacadeConfig = {
4443
```ts
4544
import facade from '@js-entity-repos/memory/dist/facade';
4645

47-
const todosFacade = facade<TodoId, TodoEntity>(todoFacadeConfig);
46+
const todosFacade = facade<TodoEntity>(todoFacadeConfig);
4847
```

0 commit comments

Comments
 (0)