| 36 | >('EC MetaReducer'); |
| 37 | |
| 38 | @Injectable() |
| 39 | class TestEntityEffects { |
| 40 | test$: Observable<Action> = createEffect(() => |
| 41 | this.actions.pipe( |
| 42 | // tap(action => console.log('test$ effect', action)), |
| 43 | ofEntityOp(persistOps), |
| 44 | map(this.testHook) |
| 45 | ) |
| 46 | ); |
| 47 | |
| 48 | testHook(action: EntityAction) { |
| 49 | return { |
| 50 | type: 'test-action', |
| 51 | payload: action, // the incoming action |
| 52 | entityName: action.payload.entityName, |
| 53 | }; |
| 54 | } |
| 55 | |
| 56 | constructor(private actions: Actions<EntityAction>) {} |
| 57 | } |
| 58 | |
| 59 | class Hero { |
| 60 | id!: number; |
nothing calls this directly
no test coverage detected