import * as zod from 'zod'; declare const INTEGER_ARRAY_TYPES: readonly ["signed", "unsigned"]; type IntegerArrayType = (typeof INTEGER_ARRAY_TYPES)[number]; declare const INTEGER_ARRAY_BITS: readonly [8, 16, 32]; type IntegerArrayBit = (typeof INTEGER_ARRAY_BITS)[number]; declare const INTEGER_ARRAY_CATEGORIES: readonly ["clamped", "standard"]; type IntegerArrayCategory = (typeof INTEGER_ARRAY_CATEGORIES)[number]; declare const INT8_ARRAY_SCHEMA: zod.ZodType; declare const INT16_ARRAY_SCHEMA: zod.ZodType; declare const INT32_ARRAY_SCHEMA: zod.ZodType; declare const INT_ARRAY_SCHEMAS: { readonly 8: { readonly standard: zod.ZodType; }; readonly 16: { readonly standard: zod.ZodType; }; readonly 32: { readonly standard: zod.ZodType; }; }; declare const UINT8_ARRAY_SCHEMA: zod.ZodType; declare const UINT8_CLAMPED_ARRAY_SCHEMA: zod.ZodType; declare const UINT16_ARRAY_SCHEMA: zod.ZodType; declare const UINT32_ARRAY_SCHEMA: zod.ZodType; declare const UINT_ARRAY_SCHEMAS: { readonly 8: { readonly standard: zod.ZodType; readonly clamped: zod.ZodType; }; readonly 16: { readonly standard: zod.ZodType; }; readonly 32: { readonly standard: zod.ZodType; }; }; declare const INTEGER_ARRAY_SCHEMAS: { readonly signed: { readonly 8: { readonly standard: zod.ZodType; }; readonly 16: { readonly standard: zod.ZodType; }; readonly 32: { readonly standard: zod.ZodType; }; }; readonly unsigned: { readonly 8: { readonly standard: zod.ZodType; readonly clamped: zod.ZodType; }; readonly 16: { readonly standard: zod.ZodType; }; readonly 32: { readonly standard: zod.ZodType; }; }; }; interface IntegerArrays { signed: { 8: { standard: Int8Array; }; 16: { standard: Int16Array; }; 32: { standard: Int32Array; }; }; unsigned: { 8: { standard: Uint8Array; clamped: Uint8ClampedArray; }; 16: { standard: Uint16Array; }; 32: { standard: Uint32Array; }; }; } type IntArray = IntegerArrays["signed"][Bit]["standard"]; type UintArray = Bit extends 8 ? IntegerArrays["unsigned"][8][Category] : IntegerArrays["unsigned"][Bit]["standard"]; type IntegerArray = Type extends "signed" ? IntArray : Type extends "unsigned" ? UintArray : never; type IntArrayOptions = { type: Type; bit: Bit; }; type Uint8ArrayOptions = { type: "unsigned"; clamped?: Clamped; bit: 8; }; type IntegerArrayOptions = Type extends "unsigned" ? Bit extends 8 ? Uint8ArrayOptions : IntArrayOptions : IntArrayOptions; declare function isUnsigned(type: IntegerArrayType): type is "unsigned"; declare function is8Bit(bit: IntegerArrayBit): bit is 8; /** * FIXME: * There's an unwanted case, where the passed options -`{ type: "standard", bit: 8 }` * the return value will be: `Uint8Array` | `Uint8ClampedArray`. * What is expected: it should pick one, and base it on the `clamped` optional key in options. */ declare function validateIntegerArray(value: unknown, options: IntegerArrayOptions): asserts value is IntegerArray; /** * FIXME: * There's an unwanted case, where the passed options -`{ type: "standard", bit: 8 }` * the return value will be: `Uint8Array` | `Uint8ClampedArray`. * What is expected: it should pick one, and base it on the `clamped` optional key in options. */ declare function isIntegerArray(value: unknown, options: IntegerArrayOptions): value is IntegerArray; export { INT16_ARRAY_SCHEMA, INT32_ARRAY_SCHEMA, INT8_ARRAY_SCHEMA, INTEGER_ARRAY_BITS, INTEGER_ARRAY_CATEGORIES, INTEGER_ARRAY_SCHEMAS, INTEGER_ARRAY_TYPES, INT_ARRAY_SCHEMAS, IntArray, IntegerArray, IntegerArrayBit, IntegerArrayCategory, IntegerArrayOptions, IntegerArrayType, IntegerArrays, UINT16_ARRAY_SCHEMA, UINT32_ARRAY_SCHEMA, UINT8_ARRAY_SCHEMA, UINT8_CLAMPED_ARRAY_SCHEMA, UINT_ARRAY_SCHEMAS, UintArray, is8Bit, isIntegerArray, isUnsigned, validateIntegerArray };