( worker: WorkerType, methodNames: string[] )
| 139 | } |
| 140 | |
| 141 | export function createProxyModule<Methods extends ModuleMethods>( |
| 142 | worker: WorkerType, |
| 143 | methodNames: string[] |
| 144 | ): ModuleProxy<Methods> { |
| 145 | const proxy: any = {} |
| 146 | |
| 147 | for (const methodName of methodNames) { |
| 148 | proxy[methodName] = createProxyFunction(worker, methodName) |
| 149 | } |
| 150 | |
| 151 | return proxy |
| 152 | } |
no test coverage detected