UNPKG

nope-validator

Version:
19 lines (18 loc) 933 B
import { NopePrimitive } from './NopePrimitive'; export declare class NopeNumber extends NopePrimitive<number> { private message; protected _type: string; integer(message?: string): this; min(size: number, message?: string): this; max(size: number, message?: string): this; greaterThan(size: number, message?: string): this; lessThan(size: number, message?: string): this; atLeast(size: number, message?: string): this; atMost(size: number, message?: string): this; between(sizeStart: number, sizeEnd: number, atLeastMessage?: string, atMostMessage?: string): this; positive(message?: string): this; negative(message?: string): this; validate(entry?: any, context?: Record<string | number, unknown>): string | undefined; validateAsync(entry?: any, context?: Record<string | number, unknown>): Promise<string | undefined>; constructor(message?: string); }