UNPKG

groq-builder

Version:

A **schema-aware**, strongly-typed GROQ query builder. It enables you to build GROQ queries using **auto-completion**, **type-checking**, and **runtime validation**.

34 lines 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Ensure these files are imported first, so we can use their implementations: require("./project"); require("./projectField"); /* * For backwards compatibility, we'll keep `grab` and `grabOne` as deprecated aliases: */ const groq_builder_1 = require("../groq-builder"); groq_builder_1.GroqBuilder.implement({ grab: deprecated(groq_builder_1.GroqBuilder.prototype.project, () => { console.warn("'grab' has been renamed to 'project' and will be removed in a future version"); }), grab$: deprecated(groq_builder_1.GroqBuilder.prototype.project, () => { console.warn("'grab$' has been renamed to 'project' and will be removed in a future version"); }), grabOne: deprecated(groq_builder_1.GroqBuilder.prototype.field, () => { console.warn("'grabOne' has been renamed to 'field' and will be removed in a future version"); }), grabOne$: deprecated(groq_builder_1.GroqBuilder.prototype.field, () => { console.warn("'grabOne$' has been renamed to 'field' and will be removed in a future version"); }), }); function deprecated(method, logWarning) { let logOnce = logWarning; return function (...args) { if (logOnce) { logOnce(); logOnce = null; } return method.apply(this, args); }; } //# sourceMappingURL=grab-deprecated.js.map