import Configuration from './conf'; import { ArrayCache } from './cache'; import { Logger, LoggerConfig } from "./logger"; import { NacosConfig } from "./conf/nacos"; export declare class StartupListener { startup(context: VWebApplicationContext): Promise; } export default class VWebApplicationContext { readonly components: { indexes: { nameIndex: ArrayCache; typeIndex: ArrayCache; }; warehouse: { [key: string | symbol]: any; }; modules: any; events: Map>; }; environment: Environment; log4j: any; readonly logger: Logger; readonly channel: { [key: string]: any; }; userDir: string; readonly timestamp: number; readonly config: Configuration; constructor(conf: string | Environment, active?: string); initialize(): Promise; props(key?: string, ignoreNotExists?: boolean): any; mount(module: any, config?: {}): void; getComponent(nameOrAnnotationOrType: string | Function): any; getComponentsBySuper(superClass: new (...ars: any[]) => T): Array; getComponents(annotationOrType: Function): Array; getComponentsByType(type: new (...ars: any[]) => T): Array; getComponentByType(type: new (...ars: any[]) => T): T; getComponentByName(name: string): any; getComponentsByAnnotation(annotation: Function): Array; private lookup; trusteeship(...types: any[]): Array; register({ name, type }: { name: any; type?: string; }, component: any, overwrite?: boolean): any; publishEvent(event: string | VWebEvent, data?: any): void; launch(): Promise; shutdown(): Promise; } export type Active = 'dev' | 'development' | 'prod' | 'production' | 'test' | 'testing'; export declare interface App { name?: string; active?: Active; includes?: string | string[]; } export declare interface Config { [name: string]: any; } export declare interface VWebConfig extends Record { app?: App; type?: 'file' | 'nacos' | 'proxy'; file?: string; nacos?: NacosConfig; proxy?: string; src?: string; debug?: false; include?: string | Array | RegExp | Array; exclude?: string | Array | RegExp | Array; workdir?: string; } export declare interface Environment extends Record { app?: App; config?: VWebConfig; props?: Record; logger?: LoggerConfig; dependencies?: Array>; preloads?: Array; modules?: { [name: string]: { require?: string; [key: string]: any; } | false; }; } export declare interface Module extends Config { name: string; launch: (this: VWebApplicationContext, config: T) => any; conf?: string; } export declare const defineModule: (module: Module | ((this: VWebApplicationContext, config: T) => any)) => Module; export declare interface VWebEvent { event: string; data?: any; async?: boolean; }