initializerDefineProperty.js 369 B

123456789
  1. export default function _initializerDefineProperty(target, property, descriptor, context) {
  2. if (!descriptor) return;
  3. Object.defineProperty(target, property, {
  4. enumerable: descriptor.enumerable,
  5. configurable: descriptor.configurable,
  6. writable: descriptor.writable,
  7. value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
  8. });
  9. }