import * as Link from './link'; import * as Map from './map'; import { ExtendedObject, MiniInfo } from './info'; import { Extends, Config } from './index'; declare type PathDescribe = [string[], string, string, object | undefined]; /** 路径递归函数接口 */ interface pathRecursion { /** * @param path 模块内路径数组 * @param module 模块 * @param appId 应用 Id * @param info 处理用基本信息 * @param restful restful 参数,如果不为 restful 模式,请忽略此参数 */ (path: string[], module: string, appId: string, info: MiniInfo, restful?: object): AsyncIterableIterator; /** * 路径匹配 * @param path 模块内路径数组 * @param module 模块 * @param appId 应用 Id * @param basePath 模块对应的路由路径数组 * @param info 处理用基本信息 * @param restful restful 参数,如果不为 restful 模式,请忽略此参数 */ (path: string[], module: string | string[], appId: string, basePath: string[], info: MiniInfo, restful?: object): AsyncIterableIterator; } /** 路径匹配函数接口 */ declare function pathRecursion(this: undefined | { getLink?: Link.get; config?: Config; extendsInt?: Extends; }, p: string[], module: string, appId: string, info: MiniInfo, restful?: object): AsyncIterableIterator; declare function pathRecursion(this: undefined | { getLink?: Link.get; config?: Config; extendsInt?: Extends; }, p: string[], module: string, appId: string, basePath: string[], info: MiniInfo, restful?: object): AsyncIterableIterator; /** 路径匹配 */ interface pathMatch { /** * @param path 原始路径数组(特别的,path[0] 表示域名) * @param info 处理用基本信息 * @param restful restful 参数,如果不为 restful 模式,请忽略此参数 */ (path: string[], linkInfo: MiniInfo, restful?: object): AsyncIterableIterator; } /** * 路径匹配 * @param path 原始路径数组(特别的,path[0] 表示域名) * @param info 处理用基本信息 * @param restful restful 参数,如果不为 restful 模式,请忽略此参数 */ declare function pathMatch(this: void | { getList: Map.list; getLink?: Link.get; pecursion?: pathRecursion; config?: Config; }, path: string[], info: MiniInfo, restful?: object): AsyncIterableIterator; export { pathRecursion, pathMatch, pathRecursion as recursion, pathMatch as match, }; export default pathMatch; export declare function init(config: Config, getList: Map.list, getLink: Link.get): { match: pathMatch; recursion: pathRecursion; };