addEffect
Generic types: | T |
This is the effect that handles adding a new row to the store.
Presentation
function addEffect (
effectServiceToken: InjectionToken<EffectService <T>>,
actions: ActionGroup <T>,
): (
actions$?: Actions<any>,
effectService?: EffectService <T>,
) => Observable<
| (Action<`[${any}] Add Success`> & {
oldRow: T;
newRow: T;
feature: string;
entity: string;
parentId: string;
parentFeature: string;
parentEntityName: string;
})
| { type: string }
>;
Returns
(actions$?: Actions<any>, effectService?: EffectService <T>) => Observable<(Action<`[${any}] Add Success`> & { oldRow: T; newRow: T; feature: string; entity: string; parentId: string; parentFeature: string; parentEntityName: string; }) | { type: string; }>
-The effect that will be called when the action is triggered
Parameters
Name | Type | Description |
---|---|---|
effectServiceToken | InjectionToken< | the effect token for the service that will be called |
actions |
| The action that will have the type of action that was triggered |