From 51280f9bd667db2a2815b778e17f7f31dc67f6a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 16 Dec 2023 16:52:59 +0100 Subject: [PATCH] fix: fix pool options TS type definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- CHANGELOG.md | 4 ++++ src/pools/pool.ts | 2 +- src/pools/worker.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf02c4df..b33680ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.1.0] - 2023-12-16 +### Fixed + +- Fix pool options TS type definition. + ### Changed - TypeScript breaking change: merge ThreadPoolOptions and ClusterPoolOptions types into PoolOptions type. diff --git a/src/pools/pool.ts b/src/pools/pool.ts index 856473ff..7bc8cf85 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -1,4 +1,4 @@ -import type { TransferListItem } from 'node:worker_threads' +import type { TransferListItem, WorkerOptions } from 'node:worker_threads' import type { EventEmitterAsyncResource } from 'node:events' import type { ClusterSettings } from 'node:cluster' import type { TaskFunction } from '../worker/task-functions' diff --git a/src/pools/worker.ts b/src/pools/worker.ts index be677a04..9a27d8a5 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -1,4 +1,4 @@ -import type { MessageChannel } from 'node:worker_threads' +import type { MessageChannel, WorkerOptions } from 'node:worker_threads' import type { EventEmitter } from 'node:events' import type { CircularArray } from '../circular-array' import type { Task } from '../utility-types' -- 2.34.1