系统:停服维护逻辑
This commit is contained in:
+2
@@ -7,6 +7,7 @@ type AnyFunc<T = any> = (...args: any[]) => T;
|
||||
type CanExportFunc = AnyFunc<Promise<any>> | AnyFunc<IterableIterator<any>>;
|
||||
type AutoInstanceType<T, U = T extends CanExportFunc ? T : T extends AnyFunc ? ReturnType<T> : T> = U extends AnyClass ? InstanceType<U> : U;
|
||||
import ExportAuth from '../../../app/service/Auth';
|
||||
import ExportGame from '../../../app/service/Game';
|
||||
import ExportTest from '../../../app/service/Test';
|
||||
import ExportTurboCore from '../../../app/service/TurboCore';
|
||||
import ExportUtils from '../../../app/service/Utils';
|
||||
@@ -14,6 +15,7 @@ import ExportUtils from '../../../app/service/Utils';
|
||||
declare module 'egg' {
|
||||
interface IService {
|
||||
auth: AutoInstanceType<typeof ExportAuth>;
|
||||
game: AutoInstanceType<typeof ExportGame>;
|
||||
test: AutoInstanceType<typeof ExportTest>;
|
||||
turboCore: AutoInstanceType<typeof ExportTurboCore>;
|
||||
utils: AutoInstanceType<typeof ExportUtils>;
|
||||
|
||||
Reference in New Issue
Block a user