badman-core
Version:
badman-core is the layer what all the badman packages depended,or can be used as a tool kit.
21 lines (20 loc) • 743 B
TypeScript
/**
* 单例对象工厂类(Depleted)
*/
export default abstract class SingletonObjectFactory2 {
protected static instances: Map<string, unknown>;
static All(): Map<string, unknown>;
static Instance<ClassType>(constructorName: string): ClassType;
static init<ClassType>(ClassTypeObj: {
new (): ClassType;
}): Promise<ClassType>;
static inits<ClassType>(...ClassTypeObjs: {
new (): ClassType;
}[]): Promise<void>;
static initWithArgs<ClassType>(ClassTypeObj: {
new (...args: any[]): ClassType;
}, args: any[]): Promise<ClassType>;
static initWithKeyArgs<ClassType>(key: string, ClassTypeObj: {
new (...args: any[]): ClassType;
}, args: any[]): Promise<ClassType>;
}