From 6a4bbcfbd2826b5e1a8cf259f1e6a0ecc5bad0d9 Mon Sep 17 00:00:00 2001 From: ijz953 Date: Thu, 27 Jun 2019 15:34:10 -0400 Subject: [PATCH] feat(effects): export EffectConfig and add docs --- modules/effects/src/index.ts | 1 + modules/effects/src/models.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/modules/effects/src/index.ts b/modules/effects/src/index.ts index 26ac588b1d..fca4c69999 100644 --- a/modules/effects/src/index.ts +++ b/modules/effects/src/index.ts @@ -1,4 +1,5 @@ export { createEffect } from './effect_creator'; +export { EffectConfig } from './models'; export { Effect } from './effect_decorator'; export { getEffectsMetadata } from './effects_metadata'; export { mergeEffects } from './effects_resolver'; diff --git a/modules/effects/src/models.ts b/modules/effects/src/models.ts index d05ead1e8b..d253c76551 100644 --- a/modules/effects/src/models.ts +++ b/modules/effects/src/models.ts @@ -1,5 +1,15 @@ +/** + * Configures an effect creator. See `createEffect`. + */ export interface EffectConfig { + /** + * Determines if the action emitted by the effect is dispatched to the store. + * If false, effect does not need to return type `Observable`. + */ dispatch?: boolean; + /** + * Determines if the effect will be resubscribed if an error occurs in the main actions stream. + */ resubscribeOnError?: boolean; }