@egova/flagwind-web
Version:
flagwind web library
30 lines (29 loc) • 744 B
TypeScript
/**
* 静态对象工厂
*/
export declare class ObjectFactory {
static maps: Map<any, any>;
/**
* 获取指定key对应的对象
* @param key 对象唯一标识
*/
static get(key: any): any;
/**
* 设置指定对象
* @param key 对象唯一标识
* @param value
*/
static set(key: any, value: any): void;
/**
* 是否存在指定key的对象
* @param key
*/
static has(key: any): boolean;
static match(head: any): Array<any>;
/**
* 根据类型创建对象
* @param serviceType 对象类型
* @param params 构造参数
*/
static create<T>(serviceType: Function | string, ...params: Array<any>): T;
}