nucleus-ui-builder
Version:
15 lines (11 loc) • 315 B
text/typescript
import { IFileCommand } from './interface';
export default class FileWriter {
private commands: IFileCommand[] = [];
addCommand(command: IFileCommand): void {
this.commands.push(command);
}
executeAll(): void {
this.commands.forEach((command) => command.execute());
this.commands = [];
}
}