/** * A collection of APIs to help assist in creating middleware. * * @module */ import type { Context } from "./context.js"; import type { RouterContext } from "./router.js"; interface GetQueryOptionsBase { /** The return value should be a `Map` instead of a record object. */ asMap?: boolean; /** Merge in the context's `.params`. This only works when a `RouterContext` * is passed. */ mergeParams?: boolean; } interface GetQueryOptionsAsMap extends GetQueryOptionsBase { /** The return value should be a `Map` instead of a record object. */ asMap: true; } /** Options which can be specified when using {@linkcode getQuery}. */ export type GetParamsOptions = GetQueryOptionsBase | GetQueryOptionsAsMap; /** Given a context, return the `.request.url.searchParams` as a `Map` of keys * and values of the params. */ export declare function getQuery(ctx: Context | RouterContext, options: GetQueryOptionsAsMap): Map; /** Given a context, return the `.request.url.searchParams` as a record object * of keys and values of the params. */ export declare function getQuery(ctx: Context | RouterContext, options?: GetQueryOptionsBase): Record; export {};