UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

8 lines (7 loc) • 665 B
import { CollectionConfigurationError } from "../errors.js"; import { codedMessage, devBuild } from "../error-message.js"; function validateCollectionIndexing(config) { if (config.autoIndex === `eager` && !config.defaultIndexType) throw new CollectionConfigurationError(/* @__PURE__ */ devBuild() && process.env.NODE_ENV !== `production` ? "autoIndex: 'eager' requires defaultIndexType to be set. Import an index type and set it:\n import { BasicIndex } from '@tanstack/db'\n createCollection({ defaultIndexType: BasicIndex, autoIndex: 'eager', ... })" : codedMessage(206)); } export { validateCollectionIndexing }; //# sourceMappingURL=validate-indexing.js.map