UNPKG

574 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const IS_NUMBER = "isNumber";
3/**
4 * Options to be passed to IsNumber decorator.
5 */
6export interface IsNumberOptions {
7 allowNaN?: boolean;
8 allowInfinity?: boolean;
9 maxDecimalPlaces?: number;
10}
11/**
12 * Checks if a given value is a number.
13 */
14export declare function isNumber(value: unknown, options?: IsNumberOptions): boolean;
15/**
16 * Checks if a value is a number.
17 */
18export declare function IsNumber(options?: IsNumberOptions, validationOptions?: ValidationOptions): PropertyDecorator;