This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const values = new WeakMap(); | |
const getValueFromMap = (obj, field) => (values.has(obj) ? values.get(obj)[field] : null) || {}; | |
export default function bindingTransforms(conf) { | |
const fields = Object.keys(conf); | |
return function bindingTransformsDecorator(cls) { | |
fields.forEach(field => { | |
Object.defineProperty(cls.prototype, field, { | |
get() { |