DEBSOURCES
Skip Quicknav
sources / node-rollup / 3.29.5-1 / test / function / samples / modify-this-via-getter / known-getter / main.js
123456789101112
const obj = { flag: false, get prop() { this.flag = true; } }; obj.prop; if (!obj.flag) { throw new Error('mutation not detected'); }