export = FileWriter; /** * utility for writing files under a specific directory * @class FileWriter * @param {String} baseDir the base directory under which files should be written * @constructor */ declare class FileWriter { /** * static helpers for capturing stdout report output; * super useful for tests! */ static startCapture(): void; static stopCapture(): void; static getOutput(): string; static resetOutput(): void; constructor(baseDir: any); baseDir: any; /** * returns a FileWriter that is rooted at the supplied subdirectory * @param {String} subdir the subdirectory under which to root the * returned FileWriter * @returns {FileWriter} */ writerForDir(subdir: string): FileWriter; /** * copies a file from a source directory to a destination name * @param {String} source path to source file * @param {String} dest relative path to destination file * @param {String} [header=undefined] optional text to prepend to destination * (e.g., an "this file is autogenerated" comment, copyright notice, etc.) */ copyFile(source: string, dest: string, header?: string): void; /** * returns a content writer for writing content to the supplied file. * @param {String|null} file the relative path to the file or the special * values `"-"` or `null` for writing to the console * @returns {ContentWriter} */ writeFile(file: string | null): ContentWriter; } /** * Base class for writing content * @class ContentWriter * @constructor */ declare class ContentWriter { /** * returns the colorized version of a string. Typically, * content writers that write to files will return the * same string and ones writing to a tty will wrap it in * appropriate escape sequences. * @param {String} str the string to colorize * @param {String} clazz one of `high`, `medium` or `low` * @returns {String} the colorized form of the string */ colorize(str: string): string; /** * writes a string appended with a newline to the destination * @param {String} str the string to write */ println(str: string): void; /** * closes this content writer. Should be called after all writes are complete. */ close(): void; } //# sourceMappingURL=file-writer.d.cts.map