后台:添加跳转地址功能

This commit is contained in:
luying
2021-05-15 11:35:30 +08:00
parent 92f2fcf51a
commit a2d2d83f93
6 changed files with 77 additions and 9 deletions
+2
View File
@@ -6,6 +6,7 @@ type AnyClass = new (...args: any[]) => any;
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 ExportGame from '../../../app/service/Game';
import ExportGmUser from '../../../app/service/GmUser';
import ExportTest from '../../../app/service/Test';
import ExportUtils from '../../../app/service/Utils';
@@ -13,6 +14,7 @@ import ExportUsers from '../../../app/service/users';
declare module 'egg' {
interface IService {
game: AutoInstanceType<typeof ExportGame>;
gmUser: AutoInstanceType<typeof ExportGmUser>;
test: AutoInstanceType<typeof ExportTest>;
utils: AutoInstanceType<typeof ExportUtils>;