UNPKG

@eggjs/tegg-plugin

Version:

module plugin for egg

20 lines (19 loc) 868 B
import { EggLoadUnitTypeLike, EggPrototype, Loader, LoadUnit, LoadUnitLifecycleContext } from '@eggjs/tegg-metadata'; import { Id, QualifierInfo } from '@eggjs/tegg'; export declare class AppLoadUnit implements LoadUnit { private readonly loader; id: Id; readonly name: string; readonly type: EggLoadUnitTypeLike; readonly unitPath: string; private protoMap; constructor(name: string, unitPath: string, loader: Loader); init(): Promise<void>; containPrototype(proto: EggPrototype): boolean; getEggPrototype(name: string, qualifiers: QualifierInfo[]): EggPrototype[]; registerEggPrototype(proto: EggPrototype): void; deletePrototype(proto: EggPrototype): void; destroy(): Promise<void>; iterateEggPrototype(): IterableIterator<EggPrototype>; static createModule(ctx: LoadUnitLifecycleContext): AppLoadUnit; }