This commit is contained in:
Rintim 2023-09-17 11:26:56 +08:00
parent 238cfd8f36
commit b74aff07c6
1 changed files with 1 additions and 9 deletions

View File

@ -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),