import { MiniInfo, ExtendedObject } from './info'; export declare type LinkDescribe = [string[], string] | [string[], string, string] | [string[], string, object] | [string[], string, string, object]; export interface LinkIterableIterator { (path: string[], info?: MiniInfo, restful?: object): IterableIterator; } export declare type LinkList = { [key: string]: LinkIterableIterator; }; export interface set { /** * 设置连接器 * @param link 连接函数 * @param path 路径 * @param appId 应用ID */ (link: LinkIterableIterator, path: string, appId?: string): void; } export interface remove { /** * 移除连接器 * @param path 路径 * @param appId 应用ID */ (path: string, appId?: string): void; } export interface get { /** * 获取连接器 * @param path 路径 * @param appId 应用ID */ (path: string, appId?: string): LinkIterableIterator | undefined; } /** * 设置连接器 * @param link 连接函数 * @param path 路径 * @param appId 应用ID */ export declare function set(this: void | LinkList, link: LinkIterableIterator, path: string, appId?: string): void; /** * 移除连接器 * @param path 路径 * @param appId 应用ID */ export declare function remove(this: void | LinkList, path: string, appId?: string): void; /** * 获取连接器 * @param path 路径 * @param appId 应用ID */ export declare function get(this: void | LinkList, path: string, appId?: string): LinkIterableIterator | undefined; interface LinkApi { /** 设置连接器 */ set: set; /** 移除连接器 */ remove: remove; /** 获取连接器 */ get: get; } declare function LinkApi(links?: LinkList): LinkApi; export declare type api = LinkApi; export default LinkApi;