import type { FloatGenerator } from '@skyleague/axioms'; import { NodeTrait } from '../../cst/mixin.js'; import type { SchemaOptions } from '../base.js'; export interface NumberOptions { /** * The resulting property will only be valid when the value divided by this parameter * results in a strict integer. (exluding zero) * * ### Example * Given `$integer({multipleOf: 0.2})` * * - input: 10 -> 10 / 0.2 = 50 (validates) * - input: 10.5 -> 10.5 / 0.2 = 52.5 (invalid) */ multipleOf?: number | undefined; /** * A number is valid if the value is lower than or equal to the parameter. * * ### Example * Given `$integer({maximum: 1.0})` * * - input: 1 (validates) * - input: 2 (invalid) */ max?: number | undefined; maxInclusive?: boolean; /** * A number is valid if the value is greater than or equal to the parameter. * * ### Example * Given `$integer({minimum: 1.0})` * * - input: 0 (invalid) * - input: 1 (validates) */ min?: number | undefined; minInclusive?: boolean; arbitrary?: Partial | undefined; } export declare class NumberType extends NodeTrait { _type: "number"; _options: NumberOptions; infer: number; input: number; constructor(options: SchemaOptions>); arbitrary(options: Partial): this; gt(value: number): this; gte(value: number): this; lt(value: number): this; lte(value: number): this; positive(): this; nonnegative(): this; negative(): this; nonpositive(): this; multipleOf(value: number): this; } /** * Create a new `NumberType` instance with the given options. * * ### Example * ```ts * $number * * $number() * * $number({maximum: 3.15}) * ``` * * @param options - Additional options to pass to the number. * * @group Primitives */ export declare function $number(options?: SchemaOptions, number>): NumberType;