docs: add missing `mapExecute` type definition to fastify examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 30 Aug 2024 15:44:30 +0000 (17:44 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 30 Aug 2024 15:44:30 +0000 (17:44 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/typescript/http-server-pool/fastify-hybrid/@types/fastify/index.d.ts
examples/typescript/http-server-pool/fastify-worker_threads/@types/fastify/index.d.ts

index 4f666be0291aa089bb39b530ad83a4cbbf696bfc..e5609e14d491f1ba7531f249738ab6fae545d4b9 100644 (file)
@@ -11,6 +11,11 @@ declare module 'fastify' {
       name?: string,
       transferList?: readonly TransferListItem[]
     ) => Promise<ThreadWorkerResponse>
+    mapExecute: (
+      data: Iterable<ThreadWorkerData>,
+      name?: string,
+      transferList?: readonly TransferListItem[]
+    ) => Promise<ThreadWorkerResponse[]>
     pool: DynamicThreadPool<ThreadWorkerData, ThreadWorkerResponse>
   }
 }
index e78ab0d97ae5c9cdd17ad0ddd13b9f00be4a90af..7e7046adc3c3f594d67ddb19f54fd478b78681c5 100644 (file)
@@ -11,6 +11,11 @@ declare module 'fastify' {
       name?: string,
       transferList?: readonly TransferListItem[]
     ) => Promise<WorkerResponse>
+    mapExecute: (
+      data: Iterable<WorkerData>,
+      name?: string,
+      transferList?: readonly TransferListItem[]
+    ) => Promise<WorkerResponse[]>
     pool: DynamicThreadPool<WorkerData, WorkerResponse>
   }
 }