UNPKG

worker-tls

Version:

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

22 lines (13 loc) 648 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [worker-tls](./worker-tls.md) &gt; [ToAsyncMethods](./worker-tls.toasyncmethods.md) ## ToAsyncMethods type 将所有方法都 转为 异步方法 **Signature:** ```typescript export type ToAsyncMethods<Methods extends INamedFunctionMap> = { [N in keyof Methods]: AsyncFun<Methods[N]>; }; ``` **References:** [INamedFunctionMap](./worker-tls.inamedfunctionmap.md)<!-- -->, [AsyncFun](./worker-tls.asyncfun.md) ## Remarks 所有的方法的入参不变,返回参数都变为解决值为对应类型的 Promise