3 ms·
This could really use an example of an invariant that couldn't be elegantly enforced with property descriptors[0] and decorators[1]. Without such an example it'
by brlewis 7y ago
This could really use an example of an invariant that couldn't be elegantly enforced with property descriptors[0] and decorators[1]. Without such an example it's just flamebait.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[1] https://www.typescriptlang.org/docs/handbook/decorators.html https://www.typescriptlang.org/docs/handbook/decorators.html