This allows code using workerpool to easily reference pool types. For example, I could write code similar to the following in workerpool 8, but in workerpool 9, I could not find an easy way to access these types, since they're just imports within the generated index.d.ts.
import { pool, type WorkerPoolOptions, type WorkerPool } from 'workerpool';
function getOptions(): WorkerPoolOptions { /* ... */ };
function makeMyPool(): WorkerPool {
const myPool = pool(getOptions());
// initialize
return myPool;
}
(workerpool 9's build-in types also rename WorkerPool to Pool, but that's an easy change to make in calling code.)
This allows code using workerpool to easily reference pool types. For example, I could write code similar to the following in workerpool 8, but in workerpool 9, I could not find an easy way to access these types, since they're just imports within the generated
index.d.ts
.(workerpool 9's build-in types also rename
WorkerPool
toPool
, but that's an easy change to make in calling code.)