UNPKG

@tanstack/react-db

Version:

React integration for @tanstack/db

21 lines (20 loc) • 799 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const db = require("@tanstack/db"); function getUnboundDescriptorReporter(client, hookName) { if (client) return void 0; return (alias) => { throw new Error( `[${hookName}] Collection descriptor "${alias}" requires a DbClient when the query is consumed. Wrap this component in <DbProvider client={client}> or use a concrete Collection.` ); }; } function getPreparedSources(preparedValue, client, hookName) { return db.getPreparedLiveQuerySources( preparedValue, getUnboundDescriptorReporter(client, hookName) ); } exports.getPreparedSources = getPreparedSources; exports.getUnboundDescriptorReporter = getUnboundDescriptorReporter; //# sourceMappingURL=source-id-bindings.cjs.map