import type { AnyConstructor } from "../../types/concepts.mjs"; import { cls } from "./typed.mjs"; import { sealedConstruct } from "../object-operation.mjs"; export const Sealed = cls((classObject) => { const proxy = new Proxy(classObject, { construct(...args) { sealedConstruct(proxy, args[2]); return Reflect.construct(...args); }, }); return proxy; }); export const Freeze = cls((classObject) => { Object.freeze(classObject); Object.freeze(classObject.prototype); });