prepare-destination.d.ts 889 B

12345678910111213141516171819
  1. /// <reference types="node" />
  2. /// <reference types="node" />
  3. import type { IncomingMessage } from 'http';
  4. import type { NextParsedUrlQuery } from '../../../../server/request-meta';
  5. import type { Params } from './route-matcher';
  6. import type { RouteHas } from '../../../../lib/load-custom-routes';
  7. import type { BaseNextRequest } from '../../../../server/base-http';
  8. export declare function matchHas(req: BaseNextRequest | IncomingMessage, query: Params, has?: RouteHas[], missing?: RouteHas[]): false | Params;
  9. export declare function compileNonPath(value: string, params: Params): string;
  10. export declare function prepareDestination(args: {
  11. appendParamsToQuery: boolean;
  12. destination: string;
  13. params: Params;
  14. query: NextParsedUrlQuery;
  15. }): {
  16. newUrl: string;
  17. destQuery: import("querystring").ParsedUrlQuery;
  18. parsedDestination: import("./parse-url").ParsedUrl;
  19. };