/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ /** * Validate that an array-like value has the expected vector dimensionality and * that every entry is a finite number. Backed vector stores (pgvector / JSON * encoders) only reject malformed inputs after a driver round-trip with an * opaque error — fail fast with a clear {@link StorageValidationError} instead. * * @param arr - The candidate vector (TypedArray, plain array, or any * array-like). `null` / `undefined` are rejected explicitly. * @param expectedDimensions - The dimensionality the store was constructed with. * @param context - Either `"write"` (insert / upsert) or `"query"` * (similarity search). The string is woven into the error * message so logs identify the failing call site. */ export declare function assertVectorShape(arr: unknown, expectedDimensions: number, context: "write" | "query"): void; /** * Validate the vector column of every entity in a batch before any write hits * the backend. Throws the same {@link StorageValidationError} as * {@link assertVectorShape}; batches are rejected as a whole — the helper * returns on the first malformed entry so no partial write can leak through. */ export declare function validateVectorEntities(entities: ReadonlyArray>, vectorPropertyName: string, dimensions: number): void; //# sourceMappingURL=assertVectorShape.d.ts.map