UNPKG

@vindev/particle

Version:

Angular Component Library using Tailwind

12 lines (11 loc) 414 B
import { Constructor } from './constructor'; export declare type TValidator<T> = (item: T) => string | true; export declare function ValidatorMixin<T extends Constructor<{}>, I>(Base?: T): { new (...args: any[]): { _validators: TValidator<I>[]; errorMessages: string[]; validators: TValidator<I>[]; validate(item: I): void; resetErrors(): void; }; } & T;