function readonly(target, name, descriptor) { descriptor.writable = false; return descriptor; } class Cat { @readonly meow() { return `${this.name} says meow!`; } } const myCat = new Cat() myCat.name = 'ziv' myCat.meow() myCat.meow = function() { console.log('meow!') }