UNPKG

@drangis-tech/file-writer

Version:

TSX file writer utility using ts-morph

29 lines (26 loc) 586 B
type Change = { kind: "text"; id: string; value: string; } | { kind: "classes"; id: string; value: string; }; interface DesignMapEntry { file: string; line: number; col: number; } interface DesignMap { [id: string]: DesignMapEntry; } declare class FileWriter { private project; constructor(); /** * Apply a change to a TSX file based on the design map. */ applyChange(change: Change, designMap: DesignMap, projectRoot: string): Promise<void>; } export { type Change, type DesignMap, type DesignMapEntry, FileWriter };