import type { OptionalKeys } from "./type-utils.ts"; /** Return values for getting the first value of a query param. */ type ParamValuesGet = { [Name in keyof Params]-?: Name extends OptionalKeys ? Params[Name] | null : Params[Name]; }; /** Return values for getting all values of a query param. */ type ParamValuesGetAll = { [Name in keyof Params]-?: Required[Name][]; }; /** * Wrapper around the search params of a request that offers methods for * querying search params with enhanced type-safety from OpenAPI-TS. */ export declare class QueryParams { #private; constructor(request: Request); /** * Wraps around {@link URLSearchParams.size}. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ get size(): number; /** * Wraps around {@link URLSearchParams.get} with type inference from the * provided OpenAPI-TS `paths` definition. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get) */ get(name: Name): ParamValuesGet[Name]; /** * Wraps around {@link URLSearchParams.getAll} with type inference from the * provided OpenAPI-TS `paths` definition. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll) */ getAll(name: Name): ParamValuesGetAll[Name]; /** * Wraps around {@link URLSearchParams.has} with type inference from the * provided OpenAPI-TS `paths` definition. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) */ has(name: Name, value?: Params[Name]): boolean; } export {}; //# sourceMappingURL=query-params.d.ts.map