Object.defineProperty(target, key, { writable: false });} @ReadOnly // notice there are no `()` name: string;const t = new Test();t.name = 'jan';
Object.defineProperty(target, key, { writable: false });
}
@ReadOnly // notice there are no `()`
name: string;
const t = new Test();
t.name = 'jan';