import { stripIndent } from "common-tags"; import { FileWriter } from "../../base"; import { IFileWriter, TFileWriterConfig } from "../../types"; import { GlobalHelpers } from "../../../helpers"; import { AppConfig } from "../../../../app-config"; class HelperSyncInterfaceWriter extends FileWriter implements IFileWriter { constructor(protected config: TFileWriterConfig) { super(config); } getFileContent() { const fileContent = stripIndent` export interface ${AppConfig.SYNC_INTERFACE_NAME} { execute:()=>void; } `; return fileContent; } execute() { try { this.write('wx'); } catch (error) { GlobalHelpers.showError(error); } } } export { HelperSyncInterfaceWriter };