UNPKG

ngx-formcontrol-errors-async

Version:

Handle your form control errors like a champ. Async is the way!!!

16 lines (15 loc) 721 B
import { AbstractControl } from '@angular/forms'; import { Observable } from 'rxjs'; export declare function prepareFormErrorObservables(): ClassDecorator; export declare function useFormErrorObservable<T>(instance: T): (keyName: string, func: () => AbstractControl, translations: { [key: string]: (errors: any, control: AbstractControl) => ControlErrorBag; }) => Observable<ControlErrorBag>; export declare function createErrorObservable(func: () => AbstractControl, translations: { [key: string]: (errors: any, control: AbstractControl) => ControlErrorBag; }): Observable<ControlErrorBag>; export interface ControlErrorBag { content: string; args?: { [key: string]: any; }; }