import { AnyRoute, RouterConfig } from './Router.js'; import { HttpMethod } from '../API/Request.js'; /** * A class that resolves routes based on the provided configuration. * @class RouteResolver */ export default class RouteResolver { /** * An object that maps HTTP methods to their corresponding routes. * @property {object} routes - The routes object. * @property {Routes} routes.method - The routes for the specified HTTP method. */ private routes; /** * Constructs a new instance of the Router class with the given configuration. * @param {RouterConfig} config - The configuration object for the router. * @returns None */ constructor(config: RouterConfig); /** * Resolves a route based on the given HTTP method and path. * @param {string} method - The HTTP method of the request. * @param {string} path - The path of the request. * @returns {Route | undefined} - The resolved route or undefined if no route is found. */ resolveRoute(method: HttpMethod, path: string): AnyRoute | undefined; /** * Builds the routes for the router based on the given configuration. * @param {RouterConfig} config - The router configuration object. * @returns None */ private buildRoutes; }