UNPKG

ddl-manager

Version:

store postgres procedures and triggers in files

27 lines (23 loc) 687 B
import { File } from "./File"; export class FSEvent { readonly created: File[]; readonly removed: File[]; constructor(changes: {created?: File[], removed?: File[]} = {}) { this.created = changes.created || []; this.removed = changes.removed || []; } create(file: File): FSEvent { const newEvent = new FSEvent({ created: this.created.concat([file]), removed: this.removed }); return newEvent; } remove(file: File): FSEvent { const newEvent = new FSEvent({ created: this.created, removed: this.removed.concat([file]) }); return newEvent; } }