UNPKG

angular-super-validator

Version:
35 lines (34 loc) 766 B
import { AbstractControl } from '@angular/forms'; /** * Form Helper * * */ export declare class SuperForm { /** * Get all errors from a Abstract Control * -- loop all children * -- eliminate keys that don't have errors * * * @param {AbstractControl} formEl * @returns {{}} */ static getAllErrors(formEl: AbstractControl): {}; /** * List the errors in a flat map * * * @param {AbstractControl} formEl * @param {string} path * @returns {{}} */ static getAllErrorsFlat(formEl: AbstractControl, path?: string): {}; /** * Flatten a deep object * * @param object * @returns {{} & any} */ static flatten(object: any, sep?: string): any; }