Skip to content

hasIndexAdmin

function hasIndexAdmin(store): store is VectorStoreCore & VectorStoreIndexAdmin;

Structural type-guard for callers that need runtime admin capabilities. Use in tools, retrievers, and contract tests that gate admin-only paths.

if (hasIndexAdmin(store)) {
await store.createIndex(...); // typechecks
}
Parameter Type

store

VectorStoreCore

store is VectorStoreCore & VectorStoreIndexAdmin