@ts-bridge/cli
Version:
Bridge the gap between ES modules and CommonJS modules with an easy-to-use alternative to `tsc`.
31 lines • 1.54 kB
TypeScript
import type { ResolvedProjectReference } from 'typescript';
import type { BuilderOptions } from './build-utils.js';
export type WorkerOptions = Omit<BuilderOptions, 'compilerOptions' | 'files' | 'host' | 'program' | 'projectReferences' | 'system'> & {
project: string;
};
export type GetBuildWorkerFunctionOptions = Omit<WorkerOptions, 'baseDirectory' | 'name' | 'project' | 'tsConfig'> & {
parentBaseDirectory: string;
};
/**
* Get the build worker function.
*
* @param options - The options to use for the worker.
* @returns The build worker function.
*/
export declare function getWorkerBuildFunction(options: GetBuildWorkerFunctionOptions): (projectReference: ResolvedProjectReference) => Promise<void>;
/**
* The main function for the worker. This function should be run in the context
* of a worker thread.
*
* @param options - The options passed to the worker as `workerData`.
* @param options.baseDirectory - The base directory of the project.
* @param options.clean - Whether to clean the output directory.
* @param options.format - The module format to use.
* @param options.name - The name of the project.
* @param options.project - The project to build.
* @param options.shims - Whether to use shims.
* @param options.tsConfig - The TypeScript configuration.
* @param options.verbose - Whether to log verbose output.
*/
export declare function main({ baseDirectory, clean, format, name, project, shims, tsConfig, verbose, }: WorkerOptions): Promise<void>;
//# sourceMappingURL=worker-utils.d.ts.map