UNPKG

@eggjs/tegg-plugin

Version:

module plugin for egg

15 lines (14 loc) 820 B
import { Application, Context } from 'egg'; import { EggPrototype } from '@eggjs/tegg-metadata'; import { LoadUnitInstance } from '@eggjs/tegg-runtime'; export declare class CompatibleUtil { static singletonProtoCache: Map<PropertyKey, EggPrototype>; static requestProtoCache: Map<PropertyKey, EggPrototype>; static getSingletonProto(name: PropertyKey): EggPrototype; static getRequestProto(name: PropertyKey): EggPrototype; private static singletonModuleProxyFactory; static appCompatible(app: Application, loadUnitInstance: LoadUnitInstance): void; static contextModuleProxyFactory(holder: Record<string, any>, ctx: Context, loadUnitInstance: LoadUnitInstance): any; static contextModuleCompatible(ctx: Context, loadUnitInstances: LoadUnitInstance[]): void; static clean(): void; }