/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { InternalError } from "#general";
const migrations = /* @__PURE__ */ new Map();
function Migration(id, migrator) {
  if (migrations.has(id)) {
    throw new InternalError(`Duplicate migration ${id}`);
  }
  migrations.set(id, migrator);
}
((Migration2) => {
  function migrate(type, values) {
    migrations.get(type.id)?.(values, type);
  }
  Migration2.migrate = migrate;
})(Migration || (Migration = {}));
export {
  Migration
};
//# sourceMappingURL=Migration.js.map
