This repository was archived by the owner on Jun 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 5
5
1 . Install it with ` npm i @js-entity-repos/memory ` .
6
6
1 . For each entity you will need to do the following.
7
7
1 . [ Create Entity interface] ( #entity-interface ) .
8
- 1 . [ Create a facade config] ( #facade -config ) .
8
+ 1 . [ Create a factory config] ( #factory -config ) .
9
9
1 . [ Construct the facade] ( #construct-the-facade ) .
10
10
1 . [ Use the facade] ( https://github.com/js-entity-repos/core/blob/master/docs/facade.md ) .
11
11
@@ -20,17 +20,17 @@ export interface TodoEntity extends Entity {
20
20
}
21
21
```
22
22
23
- ### Facade Config
23
+ ### Factory Config
24
24
25
25
``` ts
26
- import FacadeConfig from ' @js-entity-repos/memory/dist/Config' ;
26
+ import FactoryConfig from ' @js-entity-repos/memory/dist/Config' ;
27
27
28
28
interface State {
29
29
todos: TodoEntity [];
30
30
}
31
31
32
32
const state: State = { todos: [] };
33
- const todoFacadeConfig : FacadeConfig = {
33
+ const todoFactoryConfig : FactoryConfig = {
34
34
defaultPaginationLimit: 100 ,
35
35
entityName: ' todo' ,
36
36
getEntities : () => state .todos ,
@@ -41,7 +41,7 @@ const todoFacadeConfig: FacadeConfig = {
41
41
### Construct the Facade
42
42
43
43
``` ts
44
- import facade from ' @js-entity-repos/memory/dist/facade ' ;
44
+ import factory from ' @js-entity-repos/memory/dist/factory ' ;
45
45
46
- const todosFacade = facade ( todoFacadeConfig );
46
+ const todosFacade = factory ( todoFactoryConfig );
47
47
```
Original file line number Diff line number Diff line change 1
1
import facadeTest from '@js-entity-repos/core/dist/tests' ;
2
2
import { TestEntity } from '@js-entity-repos/core/dist/tests/utils/testEntity' ;
3
- import facade from './facade ' ;
3
+ import factory from './factory ' ;
4
4
5
5
interface State {
6
6
// tslint:disable-next-line:readonly-keyword
@@ -9,7 +9,7 @@ interface State {
9
9
10
10
const state : State = { entities : [ ] } ;
11
11
12
- facadeTest ( facade ( {
12
+ facadeTest ( factory ( {
13
13
defaultPaginationLimit : 100 ,
14
14
entityName : 'Test Entity' ,
15
15
getEntities : ( ) => state . entities ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments