UNPKG

@schemasjs/valibot-numbers

Version:
61 lines (58 loc) 7.42 kB
import * as v from 'valibot'; declare const UnsignedIntegerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">, v.MinValueAction<number, 0, "It should be greater than 0">]>; type UnsignedInteger = v.InferInput<typeof UnsignedIntegerSchema>; declare const UINT_MIN = 0; declare const UINT8_MAX: number; declare const Uint8Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, 0, "It should be greater than 0">, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Uint8 = v.InferInput<typeof Uint8Schema>; declare const UINT16_MAX: number; declare const Uint16Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, 0, "It should be greater than 0">, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Uint16 = v.InferInput<typeof Uint16Schema>; declare const UINT32_MAX: number; declare const Uint32Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, 0, "It should be greater than 0">, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Uint32 = v.InferInput<typeof Uint32Schema>; declare const BigUintSchema: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MinValueAction<bigint, 0n, "It should be greater than 0">]>; type BigUint = v.InferInput<typeof BigUintSchema>; declare const IntegerSchema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">]>; type Integer = v.InferInput<typeof IntegerSchema>; declare const INT8_MIN: number; declare const INT8_MAX: number; declare const Int8Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, number, `It should be greater than ${number}`>, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Int8 = v.InferInput<typeof Int8Schema>; declare const INT16_MIN: number; declare const INT16_MAX: number; declare const Int16Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, number, `It should be greater than ${number}`>, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Int16 = v.InferInput<typeof Int16Schema>; declare const INT32_MIN: number; declare const INT32_MAX: number; declare const Int32Schema: v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer number">, v.MinValueAction<number, number, `It should be greater than ${number}`>, v.MaxValueAction<number, number, `It should be less than ${number}`>]>; type Int32 = v.InferInput<typeof Int32Schema>; declare const BigIntSchema: v.BigintSchema<undefined>; declare const FLOAT32_MIN = -3.4e+38; declare const FLOAT32_MAX: number; declare const Float32Schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.CheckAction<number, "Invalid number, it is not a Float32 number">]>; type Float32 = v.InferInput<typeof Float32Schema>; declare const FLOAT64_MIN: number; declare const FLOAT64_MAX: number; declare const Float64Schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.CheckAction<number, "Invalid number, it is not a Float64 number">]>; type Float64 = v.InferInput<typeof Float64Schema>; declare const passToArray: (value: number, min: number, max: number) => number[]; declare const Uint8ArraySchema: v.InstanceSchema<Uint8ArrayConstructor, undefined>; declare const Uint8ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">, v.MinValueAction<number, 0, "It should be greater than 0">]>, v.TransformAction<number, Uint8Array<ArrayBuffer>>]>; declare const Uint16ArraySchema: v.InstanceSchema<Uint16ArrayConstructor, undefined>; declare const Uint16ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">, v.MinValueAction<number, 0, "It should be greater than 0">]>, v.TransformAction<number, Uint16Array<ArrayBuffer>>]>; declare const Uint32ArraySchema: v.InstanceSchema<Uint32ArrayConstructor, undefined>; declare const Uint32ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">, v.MinValueAction<number, 0, "It should be greater than 0">]>, v.TransformAction<number, Uint32Array<ArrayBuffer>>]>; declare const BigUint64ArraySchema: v.InstanceSchema<BigUint64ArrayConstructor, undefined>; declare const Int8ArraySchema: v.InstanceSchema<Int8ArrayConstructor, undefined>; declare const Int8ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">]>, v.TransformAction<number, Int8Array<ArrayBuffer>>]>; declare const Int16ArraySchema: v.InstanceSchema<Int16ArrayConstructor, undefined>; declare const Int16ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">]>, v.TransformAction<number, Int16Array<ArrayBuffer>>]>; declare const Int32ArraySchema: v.InstanceSchema<Int32ArrayConstructor, undefined>; declare const Int32ArrayTransform: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<"It should be a number">, v.IntegerAction<number, "It should be an integer">]>, v.TransformAction<number, Int32Array<ArrayBuffer>>]>; declare const BigInt64ArraySchema: v.InstanceSchema<BigInt64ArrayConstructor, undefined>; declare const Float32ArraySchema: v.InstanceSchema<Float32ArrayConstructor, undefined>; declare const Float32ArrayTransform: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, Float32Array<ArrayBuffer>>]>; declare const Float64ArraySchema: v.InstanceSchema<Float64ArrayConstructor, undefined>; declare const Float64ArrayTransform: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, Float64Array<ArrayBuffer>>]>; export { BigInt64ArraySchema, BigIntSchema, type BigUint, BigUint64ArraySchema, BigUintSchema, FLOAT32_MAX, FLOAT32_MIN, FLOAT64_MAX, FLOAT64_MIN, type Float32, Float32ArraySchema, Float32ArrayTransform, Float32Schema, type Float64, Float64ArraySchema, Float64ArrayTransform, Float64Schema, INT16_MAX, INT16_MIN, INT32_MAX, INT32_MIN, INT8_MAX, INT8_MIN, type Int16, Int16ArraySchema, Int16ArrayTransform, Int16Schema, type Int32, Int32ArraySchema, Int32ArrayTransform, Int32Schema, type Int8, Int8ArraySchema, Int8ArrayTransform, Int8Schema, type Integer, IntegerSchema, UINT16_MAX, UINT32_MAX, UINT8_MAX, UINT_MIN, type Uint16, Uint16ArraySchema, Uint16ArrayTransform, Uint16Schema, type Uint32, Uint32ArraySchema, Uint32ArrayTransform, Uint32Schema, type Uint8, Uint8ArraySchema, Uint8ArrayTransform, Uint8Schema, type UnsignedInteger, UnsignedIntegerSchema, passToArray };