UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

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