UNPKG

1.02 kBTypeScriptView Raw
1/**
2 * Configures an effect created by `createEffect`.
3 */
4export interface EffectConfig {
5 /**
6 * Determines if the action emitted by the effect is dispatched to the store.
7 * If false, effect does not need to return type `Observable<Action>`.
8 */
9 dispatch?: boolean;
10 /**
11 * Determines if the effect will be resubscribed to if an error occurs in the main actions stream.
12 */
13 useEffectsErrorHandler?: boolean;
14}
15export declare const DEFAULT_EFFECT_CONFIG: Readonly<Required<EffectConfig>>;
16export declare const CREATE_EFFECT_METADATA_KEY = "__@ngrx/effects_create__";
17export interface CreateEffectMetadata {
18 [CREATE_EFFECT_METADATA_KEY]: EffectConfig;
19}
20export declare type EffectPropertyKey<T extends Object> = Exclude<keyof T, keyof Object>;
21export interface EffectMetadata<T extends Object> extends Required<EffectConfig> {
22 propertyName: EffectPropertyKey<T>;
23}
24export declare type EffectsMetadata<T extends Object> = {
25 [Key in EffectPropertyKey<T>]?: EffectConfig;
26};