@rx-angular/state
Version:
@rx-angular/state is a light-weight, flexible, strongly typed and tested tool dedicated to reduce the complexity of managing component state and side effects in angular
29 lines • 1.17 kB
TypeScript
import { ErrorHandler } from '@angular/core';
import { Actions, ActionTransforms, RxActions } from './types';
import * as i0 from "@angular/core";
/**
* @deprecated - use rxActions instead
*
* This class creates RxActions bound to Angular's DI life-cycles. This prevents memory leaks and optionally makes the instance reusable across the app.
* The function has to be used inside an injection context.
* If the consumer gets destroyed also the actions get destroyed automatically.
*
* @example
* @Component({
* standalone: true,
* template: `...`,
* })
* export class AnyComponent {
* ui = rxActions<{search: string, refresh: void}>();
* }
*/
export declare class RxActionFactory<T extends Partial<Actions>> {
private readonly errorHandler?;
private readonly subjects;
constructor(errorHandler?: ErrorHandler | undefined);
create<U extends ActionTransforms<T> = object>(transforms?: U): RxActions<T, U>;
destroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<RxActionFactory<any>, [{ optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<RxActionFactory<any>>;
}
//# sourceMappingURL=actions.factory.d.ts.map