File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export default class App {
2222
2323 configDidLoad ( ) {
2424 this . eggContextHandler = new EggContextHandler ( this . app ) ;
25+ this . app . eggContextHandler = this . eggContextHandler ;
2526 this . eggContextHandler . register ( ) ;
2627 this . app . moduleHandler = new ModuleHandler ( this . app ) ;
2728 }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121import { LoaderFactory } from '@eggjs/tegg-loader' ;
2222import { IdenticalUtil , EggProtoImplClass } from '@eggjs/tegg' ;
2323import { ModuleHandler } from '../lib/ModuleHandler' ;
24+ import { EggContextHandler } from '../lib/EggContextHandler' ;
2425
2526declare module 'egg' {
2627 export interface EggModule {
@@ -50,6 +51,7 @@ declare module 'egg' {
5051 eggObjectLifecycleUtil : typeof EggObjectLifecycleUtil ;
5152 teggContext : EggContext ;
5253 moduleHandler : ModuleHandler ;
54+ eggContextHandler : EggContextHandler ;
5355
5456 mockModuleContext ( data ?: any ) : Promise < Context > ;
5557 mockModuleContextScope < R = any > ( fn : ( ctx : Context ) => Promise < R > , data ?: any ) : Promise < R > ;
You can’t perform that action at this time.
0 commit comments