/** * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ import type { CompiledRouteDefinition, PageReference, StringAttributes, QueryObject, NullableStringAttributes } from './types.js'; /** * f(route, routes[]) -> RouteDef * Match a route's id to a Route Definition id from the given list. * * @param {object} route - Route to match to a Route Definition * @param {array[object]} routeDefs - List of Route Definitions to match to the url * * @returns {object | null} */ export declare function matchRouteDefinitionByPageReference(pageReference: PageReference, routeDefs: CompiledRouteDefinition[]): CompiledRouteDefinition | null; /** * Returns an object of paramName->pathValue pairs based on the given path string * and the params defined within the routeDef uri * @param path * @param routeDef */ export declare function getPathParams(path: string, routeDef: CompiledRouteDefinition): StringAttributes | null; /** * Returns an object of paramName->queryValue pairs based on the given queryObject * and bindings defined within the routeDef uri * @param queryObj * @param routeDef */ export declare function getQueryParams(queryObj: QueryObject, routeDef: CompiledRouteDefinition): NullableStringAttributes | null; /** * f(path, routeDef) -> { "attr1": "one", "attr2": "two" } * Parse a path into an object of attributes based on the Route Definition's parameterized path. * URI decode the path parts that are parsed as attributes. * * @param {string} path - A path (hopefully) matching the Route Definition * @param {object} routeDef - Route Definition containing the path to parameterize * * @returns {object} */ export declare function getPageReferenceFromUriAndRouteDef(uri: string, routeDef: CompiledRouteDefinition): PageReference | null; //# sourceMappingURL=routeDefUtils.d.ts.map