UNPKG

mframejs

Version:
25 lines 761 B
import { CONSTANTS } from '../interface/exported'; export function observable(options) { let _options; _options = options; return function (target, key) { if (!target[CONSTANTS.META_BINDABLE]) { target[CONSTANTS.META_BINDABLE] = {}; } if (options) { if (!options.attribute) { options.attribute = null; } } if (!target[CONSTANTS.META_BINDABLE][key]) { target[CONSTANTS.META_BINDABLE][key] = { key: key, observableOnly: true, options: _options || { attribute: null } }; } }; } //# sourceMappingURL=observable.js.map