read-gedcom
Version:
Gedcom file reader
21 lines • 572 B
JavaScript
/**
* This annotation controls the enumerability of a property.
* @param value
*/
export const enumerable = (value) =>
// eslint-disable-next-line
(target, prop, descriptor) => {
if (descriptor) {
descriptor.enumerable = value;
}
else {
const propSymbol = Symbol(prop);
Object.defineProperty(target, prop, {
configurable: true,
enumerable: value,
get() { return this[propSymbol]; },
set(value) { this[propSymbol] = value; },
});
}
};
//# sourceMappingURL=decorators.js.map