UNPKG

@rnm/tscx

Version:

A tsc wrapper with many convenient features.

38 lines 1.05 kB
import type ts from "typescript"; export interface CompilerOptions extends Record<string, string | boolean> { project: string; remove: boolean; copyfiles: boolean; script?: string; exec?: string; } export interface TsConfig { compilerOptions?: ts.CompilerOptions; include?: string[]; exclude?: string[]; files?: string[]; } export declare class Compiler { private readonly options; private id; private currentSubprocess?; private tsconfig; private rootDir; private outDir; constructor(options: CompilerOptions); compile(): void; private getTasks; private execTasks; refreshTsConfig(): void; private getTsConfig; getInclude(): string[] | undefined; getOutDir(): string; private getRootDir; /** * Get the longest common dir. https://www.typescriptlang.org/tsconfig#rootDir * @param files file paths like ['./src/index.ts', './index.ts'] * @returns absolute path */ private getRootDirByFiles; } //# sourceMappingURL=compiler.d.ts.map