build(deps-dev): apply updates
[poolifier.git] / examples / typescript / http-server-pool / fastify-hybrid / src / fastify-poolifier.ts
index 2d13758028f8105f893226d91ed1c8ff07482949..3c5e31e34dc85c9583b29ba427d8cb66704cb686 100644 (file)
@@ -1,6 +1,6 @@
 import type { TransferListItem } from 'node:worker_threads'
 import { DynamicThreadPool, availableParallelism } from 'poolifier'
-import { type FastifyPluginCallback } from 'fastify'
+import type { FastifyPluginCallback } from 'fastify'
 import fp from 'fastify-plugin'
 import {
   type FastifyPoolifierOptions,
@@ -22,8 +22,8 @@ const fastifyPoolifierPlugin: FastifyPluginCallback<FastifyPoolifierOptions> = (
   }
   const { workerFile, minWorkers, maxWorkers, ...poolOptions } = options
   const pool = new DynamicThreadPool<ThreadWorkerData, ThreadWorkerResponse>(
-    minWorkers as number,
-    maxWorkers as number,
+    minWorkers!,
+    maxWorkers!,
     workerFile,
     poolOptions
   )