import Tinypool from 'tinypool'; import { type ThreadsOptions } from '../types/types-threads-options.js'; import startBuildWorker from './start-build-worker.js'; interface BaseThreadPool { startBuildWorker: (options: Parameters[0]) => ReturnType; terminate(): void; } /** * Represents a thread pool for unit testing. */ declare class ThreadPoolForUnittest implements BaseThreadPool { startBuildWorker(options: Parameters[0]): Promise; terminate(): void; } /** * Represents a thread pool for executing tasks using the TinyPool library. */ declare class ThreadPoolForTinyPool implements BaseThreadPool { pool: Tinypool; /** * Creates a new instance of the `ThreadPoolForTinyPool` class. * @param workerPath The path to the worker file. * @param workerSize The number of worker threads to create. * @param options Optional configuration options for the worker pool. */ constructor(workerPath: string, options?: ThreadsOptions); startBuildWorker(options: Parameters[0]): ReturnType; terminate(): void; } export declare const createThreadWorker: (options?: ThreadsOptions) => ThreadPoolForUnittest | ThreadPoolForTinyPool; export {};