MCPcopy Create free account
hub / github.com/ngrx/platform / EffectWithOnInitAndResponse

Class EffectWithOnInitAndResponse

modules/effects/spec/integration.spec.ts:382–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380 }
381
382 @Injectable()
383 class EffectWithOnInitAndResponse implements OnInitEffects {
384 response = createEffect(() => {
385 return this.actions$.pipe(
386 ofType('[EffectWithOnInitAndResponse]: INIT'),
387 map(() => ({ type: '[EffectWithOnInitAndResponse]: INIT Response' }))
388 );
389 });
390
391 noop = createEffect(() => {
392 return this.actions$.pipe(
393 ofType('noop'),
394 map(() => ({ type: 'noop response' }))
395 );
396 });
397
398 constructor(private actions$: Actions) {}
399
400 ngrxOnInitEffects(): Action {
401 return { type: '[EffectWithOnInitAndResponse]: INIT' };
402 }
403 }
404
405 class RootEffectWithInitAction implements OnInitEffects {
406 ngrxOnInitEffects(): Action {

Callers

nothing calls this directly

Calls 2

createEffectFunction · 0.90
ofTypeFunction · 0.90

Tested by

no test coverage detected