UNPKG

@hiki9/rich-domain

Version:

Rich Domain is a library that provides a set of tools to help you build complex business logic in NodeJS using Domain Driven Design principles.

17 lines 1.15 kB
export declare const is: { nullable(callback: (args: any) => string | undefined): (value: any) => string | undefined; arrayOf(callback: (args: any) => string | undefined): (value: any[]) => string | undefined; in(values: any[]): (value: any) => string | undefined; defined(): (value: any) => "Tipo de valor inválido. Esperava um valor definido." | undefined; anyType(): (value?: any) => void; uuid(): (value: string) => "UUID inválido." | undefined; string(min?: number, max?: number): (value: string) => string | undefined; email(): (value: string) => "Email inválido." | undefined; date(): (value: any) => "Esperava receber um valor de data válido." | undefined; number(min?: number, max?: number): (value: number) => string | undefined; integer(min?: number, max?: number): (value: number) => string | undefined; boolean(): (value: boolean) => "Tipo de valor inválido. Esperava receber um valor booleano." | undefined; enumOf(enumInstance: any): (value: any) => string | undefined; instanceof(clazz: any): (value: any) => string | undefined; }; //# sourceMappingURL=validation-is.d.ts.map