type MatchPath = { path: string; params: Record; }; /** * RESTful 风格api * @param {String} pattern pattern * @param {String} path paths * @example * const pattern = '/users/:id'; * const pathToMatch = '/users/123'; * const result = matchPath(pattern, pathToMatch); * if (result) { * console.log('Match found:', result); * console.log('Params:', result.params); * } else { * console.log('No match found.'); * } * @returns {MatchPath|null} MatchPath */ declare function matchPath(pattern: string, path: string): MatchPath | null; export default matchPath;