// Object.freeze enforces immutability at RUNTIME and types the
// result as Readonly<T>, so writes are also caught at compile time
const frozen = Object.freeze({ id: 1 });
// frozen.id = 2 would be a type error
console.log(Object.isFrozen(frozen), frozen.id);runtime immutability plus Readonly<T>