UNPKG

worker-tls

Version:

worker-tls 提供了 动态Worker 功能 和 其它一些 Worker 场景下有用的工具集;让开发者可以像调用对象方法一样动态地调用Worker中的方法,也可以随时地往 Worker 中动态地添加函数 等等。

20 lines (11 loc) 612 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [worker-tls](./worker-tls.md) &gt; [AsyncCMD](./worker-tls.asynccmd.md) ## AsyncCMD type 转为异步的命令 **Signature:** ```typescript export type AsyncCMD<Value> = Value extends AnyFunction ? AsyncFun<Value> : (() => Promise<Awaited<Value>>); ``` **References:** [AsyncFun](./worker-tls.asyncfun.md) ## Remarks 函数的入参不变,返回参数都变为解决值为对应类型的 Promise 其它非函数的值都变为返回解决值为对应类型的 Promise 的函数