Update examples/typescript/http-client-pool/src/worker.ts
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 8 Sep 2023 12:41:48 +0000 (14:41 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 12:41:48 +0000 (14:41 +0200)
examples/typescript/http-client-pool/src/worker.ts

index d9298e3fa6b8fc3a76fc0b291c92d1471e667b6d..b7c5962914cd0e0e8ab9604182232875c392c771 100644 (file)
@@ -11,7 +11,7 @@ class HttpClientWorker extends ThreadWorker<WorkerData, WorkerResponse> {
     super({
       node_fetch: async (workerData?: WorkerData) => {
         const response = await nodeFetch(
-          (workerData as WorkerData).input,
+          (workerData as WorkerData).input as URL | NodeFetchRequestInfo,
           workerData?.init as NodeFetchRequestInit
         )
         // The response is not structured-cloneable, so we return the response text body instead.