@pubby/sdk
Version:
Pubby Development Kit
17 lines (16 loc) • 730 B
TypeScript
import { PubbyModule } from "./module";
import { $modulesMap } from "./meta";
import { PubbyConfig } from "./modules";
export interface PubbyModuleContructor<O = {}> extends Function {
new (client: Pubby, options: O): PubbyModule;
}
export declare class Pubby {
[$modulesMap]: Map<PubbyModuleContructor<{}>, PubbyModule<any>>;
initialized: boolean;
constructor(config?: PubbyConfig);
use<T extends PubbyModuleContructor<any>>(ModuleConstructor: T, options?: T["prototype"]["options"]): this;
has<T extends string>(name: T): this is Record<T, any>;
require<T extends PubbyModuleContructor<any>>(ModuleConstructor: T): boolean;
init(): Promise<Pubby>;
dispose(): Promise<void>;
}