UNPKG

repomix

Version:

A tool to pack repository contents to single file for AI consumption

23 lines (22 loc) 918 B
import { type Options, Tinypool } from 'tinypool'; import type { WorkerType } from './unifiedWorker.js'; export type WorkerRuntime = NonNullable<Options['runtime']>; export type { WorkerType } from './unifiedWorker.js'; export interface WorkerOptions { numOfTasks: number; workerType: WorkerType; runtime: WorkerRuntime; maxWorkerThreads?: number; } export declare const getProcessConcurrency: () => number; export declare const getWorkerThreadCount: (numOfTasks: number, maxWorkerThreads?: number) => { minThreads: number; maxThreads: number; }; export declare const createWorkerPool: (options: WorkerOptions) => Tinypool; export declare const cleanupWorkerPool: (pool: Tinypool) => Promise<void>; export interface TaskRunner<T, R> { run: (task: T) => Promise<R>; cleanup: () => Promise<void>; } export declare const initTaskRunner: <T, R>(options: WorkerOptions) => TaskRunner<T, R>;