From: Jérôme Benoit Date: Sat, 16 Dec 2023 15:52:59 +0000 (+0100) Subject: fix: fix pool options TS type definition X-Git-Tag: v3.1.1~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=51280f9bd667db2a2815b778e17f7f31dc67f6a8;p=poolifier.git fix: fix pool options TS type definition Signed-off-by: Jérôme Benoit --- 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'