diff --git a/game/game.js b/game/game.js index 4fbe7ce1e..b1c17fb67 100644 --- a/game/game.js +++ b/game/game.js @@ -7271,16 +7271,8 @@ } }, genAsync:fn=>gnc.of(fn), - genAwait:_=>{throw new Error("lib.genAwait is removed!");}, + genAwait:item=>gnc.is.generator(item)?gnc.of(function*(){for(const content of item){yield content;}})():Promise.resolve(item), gnc:{ - /** - * @deprecated please use `gnc.of` - */ - async:fn=>{ - console.log("Deprecated: please use `gnc.of`."); - return gnc.of(fn); - }, - await:_=>{throw new Error("lib.gnc.await is removed.");}, of:fn=>gnc.of(fn), is:{ coroutine:item=>gnc.is.coroutine(item),