ngx-vest-forms
Version:
Opinionated template-driven forms library for Angular
27 lines (26 loc) • 1.82 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { AbstractControl, AsyncValidator, AsyncValidatorFn, ValidationErrors } from '@angular/forms';
import { Observable } from 'rxjs';
import { StaticSuite } from 'vest';
import { ValidationOptions } from './validation-options';
import * as i0 from "@angular/core";
export declare class ValidateRootFormDirective<T> implements AsyncValidator, OnDestroy {
validationOptions: import("@angular/core").InputSignal<ValidationOptions>;
private readonly destroy$$;
readonly formValue: import("@angular/core").InputSignal<T | null>;
readonly suite: import("@angular/core").InputSignal<StaticSuite<string, string, (model: T, field: string) => void> | null>;
/**
* Whether the root form should be validated or not
* This will use the field rootForm
*/
readonly validateRootForm: import("@angular/core").InputSignal<boolean>;
/**
* Used to debounce formValues to make sure vest isn't triggered all the time
*/
private readonly formValueCache;
validate(control: AbstractControl<any, any>): Observable<ValidationErrors | null>;
createAsyncValidator(field: string, validationOptions: ValidationOptions): AsyncValidatorFn;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ValidateRootFormDirective<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ValidateRootFormDirective<any>, "form[validateRootForm][formValue][suite]", never, { "validationOptions": { "alias": "validationOptions"; "required": false; "isSignal": true; }; "formValue": { "alias": "formValue"; "required": false; "isSignal": true; }; "suite": { "alias": "suite"; "required": false; "isSignal": true; }; "validateRootForm": { "alias": "validateRootForm"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}