@focuson/cod
Version:
A command line tool to help with the code on demand
19 lines (18 loc) • 932 B
TypeScript
import { ParsedPath } from "path";
import { Files, PathAndSha } from "./Files";
export interface SourceAndTargetDir {
sourceDir: string;
targetDir: string;
}
export declare class TsxTransformer {
files: Files;
constructor(files: Files);
transformTheCodeAfterBabel(result: string, file: string): string;
remoteImportStatementsAndBlankNewLines: (contents: string) => string;
checkResult(file: string, result: string | null): string;
transformCode(contents: string, file: string): Promise<string>;
toFileName: (sourceAndTargetDir: SourceAndTargetDir) => (parsedPath: ParsedPath, sha: string) => ParsedPath;
loadAndTransformOneFile(sourceAndTargetDir: SourceAndTargetDir): (file: string) => Promise<PathAndSha>;
loadAndtransformAllFiles(sourceAndTargetDir: SourceAndTargetDir): Promise<PathAndSha[]>;
validate(sourceAndTargetDir: SourceAndTargetDir): Promise<void[]>;
}