import type { IntegerGenerator } from '@skyleague/axioms'; import { NodeTrait } from '../../cst/mixin.js'; import type { SchemaOptions } from '../base.js'; export interface IntegerOptions { /** * 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 IntegerType extends NodeTrait { _type: "integer"; _options: IntegerOptions; infer: number; input: number; constructor({ minInclusive, maxInclusive, ...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 `IntegerType` instance with the given options. * * ### Example * ```ts * $integer * * $integer() * * $integer({maximum: 3.15}) * ``` * * @param options - Additional options to pass to the integer. * * @group Primitives */ export declare function $integer(options?: SchemaOptions, number>): IntegerType;