UNPKG

@akala/core

Version:
32 lines (31 loc) 1.71 kB
import { Injector, InjectableWithTypedThis, Injectable } from './injector'; export declare class ExtendableEvent { private promises; waitUntil<T>(p: PromiseLike<T>): void; complete(): Promise<any[]>; get done(): boolean; private _done; } export declare class Module extends Injector { name: string; dep?: string[]; constructor(name: string, dep?: string[]); private emitter; private static o; readonly activateEvent: ExtendableEvent; readonly readyEvent: ExtendableEvent; static registerModule(m: Module): void; ready(toInject: string[], f: InjectableWithTypedThis<any, ExtendableEvent>): any; ready(toInject: string[]): (f: InjectableWithTypedThis<any, ExtendableEvent>) => this; readyAsync(toInject: string[], f: InjectableWithTypedThis<any, ExtendableEvent>): any; readyAsync(toInject: string[]): (f: InjectableWithTypedThis<any, ExtendableEvent>) => this; activate(toInject: string[], f: InjectableWithTypedThis<any, ExtendableEvent>): any; activate(toInject: string[]): (f: InjectableWithTypedThis<any, ExtendableEvent>) => this; activateAsync(toInject: string[], f: InjectableWithTypedThis<any, ExtendableEvent>): any; activateAsync(toInject: string[]): (f: InjectableWithTypedThis<any, ExtendableEvent>) => this; activateNew(...toInject: string[]): <T>(ctor: new (...args: any[]) => T) => any; activateNewAsync(...toInject: string[]): <T>(ctor: new (...args: any[]) => T) => any; readyNew(...toInject: string[]): <T>(ctor: new (...args: any[]) => T) => any; readyNewAsync(...toInject: string[]): <T>(ctor: new (...args: any[]) => T) => any; start(toInject?: string[], f?: Injectable<any>): void; }