@tanstack/db
Version:
A reactive client store for building super fast apps on sync
16 lines (15 loc) • 789 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const errors = require("../errors.cjs");
const errorMessage = require("../error-message.cjs");
function validateCollectionIndexing(config) {
if (config.autoIndex === `eager` && !config.defaultIndexType) {
throw new errors.CollectionConfigurationError(
errorMessage.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', ... })` : errorMessage.codedMessage(206)
);
}
}
exports.validateCollectionIndexing = validateCollectionIndexing;
//# sourceMappingURL=validate-indexing.cjs.map