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**.

13 lines (12 loc) 558 B
import { Parser } from "../types/public-types"; declare module "../groq-builder" { interface GroqBuilder<TResult, TQueryConfig> { /** * An "escape hatch" allowing you to write any groq query you want. * You must specify a type parameter for the new results. * * This should only be used for unsupported features, since it bypasses all strongly-typed inputs. */ raw<TResultNew = never>(query: string, parser?: Parser<unknown, TResultNew> | null): GroqBuilder<TResultNew, TQueryConfig>; } }