feat: add callSyncMethod

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-01-17 11:08:51 +08:00
parent 94ebbf3cba
commit 9546881691
4 changed files with 18 additions and 3 deletions

View File

@ -13,6 +13,9 @@ export class BungeeTaskManager implements task.TaskManager {
if (Object.prototype.toString.call(func) !== "[object Function]") { throw TypeError('第一个参数 Task 必须为 function !'); };
return new BungeeTask(this.pluginInstance, func);
}
callSyncMethod(func: Function): any {
return func();
}
}
export class BungeeTask extends task.Task {