export type WriteFileFunc = (contents: string) => Promise; export type FileDiff = { path: string; missing: boolean; targetContents: string; templateContents: string; write: WriteFileFunc; }; export type PromptFunc = (msg: string) => Promise; export type HandlerFunc = (file: FileDiff, prompt: PromptFunc) => Promise; export type FileHandler = { patterns: Array; handler: HandlerFunc; };