/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { FromSchema } from "../json-schema/FromSchema"; import { JsonSchema } from "../json-schema/JsonSchema"; /** * Supported typed array types * - Float16Array: 16-bit floating point (medium precision) * - Float32Array: Standard 32-bit floating point (most common) * - Float64Array: 64-bit floating point (high precision) * - Int8Array: 8-bit signed integer (binary quantization) * - Uint8Array: 8-bit unsigned integer (quantization) * - Int16Array: 16-bit signed integer (quantization) * - Uint16Array: 16-bit unsigned integer (quantization) */ export type TypedArray = Float32Array | Float16Array | Float64Array | Int8Array | Uint8Array | Int16Array | Uint16Array; export type TypedArrayConstructor = typeof Float16Array | typeof Float32Array | typeof Float64Array | typeof Int8Array | typeof Uint8Array | typeof Int16Array | typeof Uint16Array; export type TypedArrayString = "TypedArray" | "TypedArray:Float16Array" | "TypedArray:Float32Array" | "TypedArray:Float64Array" | "TypedArray:Int8Array" | "TypedArray:Uint8Array" | "TypedArray:Int16Array" | "TypedArray:Uint16Array"; export declare function isTypedArray(value: unknown): value is TypedArray; declare const TypedArraySchemaOptions: { readonly parseNotKeyword: true; readonly parseIfThenElseKeywords: true; readonly keepDefaultedPropertiesOptional: true; readonly references: false; readonly deserialize: [{ readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Float64Array"; }; readonly output: Float64ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Float32Array"; }; readonly output: Float32ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Float16Array"; }; readonly output: Float16ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Int16Array"; }; readonly output: Int16ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Int8Array"; }; readonly output: Int8ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Uint8Array"; }; readonly output: Uint8ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray:Uint16Array"; }; readonly output: Uint16ArrayConstructor; }, { readonly pattern: { readonly type: "array"; readonly format: "TypedArray"; }; readonly output: TypedArray; }]; }; export type TypedArraySchemaOptions = typeof TypedArraySchemaOptions; export type VectorFromSchema = FromSchema; export declare const TypedArraySchema: (annotations?: Record) => { readonly type: "array"; readonly format: "TypedArray"; readonly title: "Typed Array"; readonly description: "A typed array (Float32Array, Int8Array, etc.)"; }; export {}; //# sourceMappingURL=TypedArray.d.ts.map