import * as React from 'react'; import { JSX } from 'react'; import { QueryGenqlSelection, QueryResult, Options } from './index.js'; import { GraphQLExact, StripAllArgs } from './type-helpers.js'; interface PumpQuery extends QueryGenqlSelection { } type ExactPumpQueries> = { [K in keyof Queries]: Queries[K] & GraphQLExact, Queries[K]>; }; type PumpProps, Bind extends unknown | undefined = undefined> = { children: Bind extends undefined ? (data: QueryResults) => React.ReactNode | Promise : (boundProps: Bind, data: QueryResults) => React.ReactNode | Promise; queries: [...ExactPumpQueries]; bind?: Bind; } & Omit & { /** * same as "ref" (like to fetch from a specific branch or commit), but to avoid React complaining about the "ref" prop */ _ref?: Options["ref"]; }; type QueryResults> = { [K in keyof Queries]: QueryResult; }; declare const Pump: , Bind extends unknown | undefined = undefined>({ children, queries, bind, _ref, ..._basehubProps }: PumpProps) => Promise; /** * Create a Pump with a bound query. Accepts either a query object or a function that returns a query object. * Useful for reusing the same query across multiple components. */ declare const createPump: | void, Bind = undefined>(queries: ExactPumpQueries | ((params: Params) => ExactPumpQueries)) => (props: Omit, "queries"> & (Params extends void ? unknown : { params: Params; })) => Promise; export { Pump as P, type QueryResults as Q, type PumpProps as a, type PumpQuery as b, createPump as c };