import { ManifestVersion } from "../../manifest/ManifestTypes" import { Effects } from "../../types" import { Utils } from "../../util/utils" export class Migration { constructor( readonly options: { version: Version up: (opts: { effects: Effects; utils: Utils }) => Promise down: (opts: { effects: Effects; utils: Utils }) => Promise }, ) {} static of(options: { version: Version up: (opts: { effects: Effects; utils: Utils }) => Promise down: (opts: { effects: Effects; utils: Utils }) => Promise }) { return new Migration(options) } async up(opts: { effects: Effects; utils: Utils }) { this.up(opts) } async down(opts: { effects: Effects; utils: Utils }) { this.down(opts) } }