A class decorator that secures a class instance with a mutation-throwing Proxy.
Provides "noisy immutability" by throwing an error if modifications are attempted.
Workaround: To protect against aggressive bundlers (Rollup/Terser) mutating the TS 7.0
ES2022 decorator IIFE structure, users must append return Object.freeze(this) as this;
(or the secure equivalent) to their constructors to ensure immutability survives production bundling.
A class decorator that secures a class instance with a mutation-throwing Proxy. Provides "noisy immutability" by throwing an error if modifications are attempted.