@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
20 lines (19 loc) • 1.07 kB
TypeScript
import { AfterAction } from './after-action';
import * as i0 from "@angular/core";
export declare class CallChainService {
constructor();
/**
* Creates a call chain `Subject` that performs an action when a value is emitted into it.
*
* Useful for creating call chains for methods like [assign Task]{@link AssignTaskService#assign}.
* By using this function you don't have to handle the `Subject` logic and can only focus on the callback.
* This can make the code easier to understand as the intent is not obscured by the `Subject` handling.
*
* @param callback the function that should be executed when a value is emitted into the `Subject`.
* The emitted value is passed as the argument.
* @returns a subscribed `Subject` instance that performs the provided `callback` on the first emission and then completes
*/
create(callback: (boolean: any) => void): AfterAction;
static ɵfac: i0.ɵɵFactoryDeclaration<CallChainService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CallChainService>;
}