UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

14 lines (11 loc) 443 B
import { Path } from './matchRequestUrl.mjs'; /** * Normalizes a given request handler path: * - Preserves RegExp. * - Removes query parameters and hashes. * - Rebases relative URLs against the "baseUrl" or the current location. * - Preserves relative URLs in Node.js, unless specified otherwise. * - Preserves optional path parameters. */ declare function normalizePath(path: Path, baseUrl?: string): Path; export { normalizePath };