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 551 . Install it with ` npm i @js-entity-repos/memory ` .
661 . For each entity you will need to do the following.
77 1 . [ Create Entity interface] ( #entity-interface ) .
8- 1 . [ Create a facade config] ( #facade -config ) .
8+ 1 . [ Create a factory config] ( #factory -config ) .
99 1 . [ Construct the facade] ( #construct-the-facade ) .
1010 1 . [ Use the facade] ( https://github.com/js-entity-repos/core/blob/master/docs/facade.md ) .
1111
@@ -20,17 +20,17 @@ export interface TodoEntity extends Entity {
2020}
2121```
2222
23- ### Facade Config
23+ ### Factory Config
2424
2525``` ts
26- import FacadeConfig from ' @js-entity-repos/memory/dist/Config' ;
26+ import FactoryConfig from ' @js-entity-repos/memory/dist/Config' ;
2727
2828interface State {
2929 todos: TodoEntity [];
3030}
3131
3232const state: State = { todos: [] };
33- const todoFacadeConfig : FacadeConfig = {
33+ const todoFactoryConfig : FactoryConfig = {
3434 defaultPaginationLimit: 100 ,
3535 entityName: ' todo' ,
3636 getEntities : () => state .todos ,
@@ -41,7 +41,7 @@ const todoFacadeConfig: FacadeConfig = {
4141### Construct the Facade
4242
4343``` ts
44- import facade from ' @js-entity-repos/memory/dist/facade ' ;
44+ import factory from ' @js-entity-repos/memory/dist/factory ' ;
4545
46- const todosFacade = facade ( todoFacadeConfig );
46+ const todosFacade = factory ( todoFactoryConfig );
4747```
Original file line number Diff line number Diff line change 11import facadeTest from '@js-entity-repos/core/dist/tests' ;
22import { TestEntity } from '@js-entity-repos/core/dist/tests/utils/testEntity' ;
3- import facade from './facade ' ;
3+ import factory from './factory ' ;
44
55interface State {
66 // tslint:disable-next-line:readonly-keyword
@@ -9,7 +9,7 @@ interface State {
99
1010const state : State = { entities : [ ] } ;
1111
12- facadeTest ( facade ( {
12+ facadeTest ( factory ( {
1313 defaultPaginationLimit : 100 ,
1414 entityName : 'Test Entity' ,
1515 getEntities : ( ) => state . entities ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments