UNPKG

ngx-control-operators

Version:

RxJS operators for Angular reactive form controls

25 lines (24 loc) 885 B
import { AbstractControl } from "@angular/forms"; import { MonoTypeOperatorFunction } from "rxjs"; /** * Enables control for every truthy value, disables it otherwise. * @see {@link disableControl} for inverse * @param control - target to enable or disable * @param opts - enable/disable options * @returns operator function */ export declare function enableControl<T>(control: AbstractControl, opts?: { onlySelf?: boolean; emitEvent?: boolean; }): MonoTypeOperatorFunction<T>; /** * Disables control for every truthy value, enables it otherwise. * @see {@link enableControl} for inverse * @param control - target to enable or disable * @param opts - enable/disable options * @returns operator function */ export declare function disableControl<T>(control: AbstractControl, opts?: { onlySelf?: boolean; emitEvent?: boolean; }): MonoTypeOperatorFunction<T>;