Skip to content
1 min read · 68 words

Variable: vectorStoreConstructorSchema ​

ts
const vectorStoreConstructorSchema: AnySchema<any>;

Defined in: src/batteries/vector/vector_store_constructor.ts:50

Validator schema for a VectorStoreConstructorLike value.

Remarks ​

Invoked at validate-time, so inspecting the constructor's prototype is safe. The check is duck-typed: the value must be a function whose prototype carries every canonical adapter instance method. This mirrors spooledArtifactConstructorSchema's cross-realm-safe pattern — instanceof BaseVectorStore would be tighter but would couple this contract to the class value and reject structurally-valid (e.g. cross-realm) adapters.