Moti Zilberman f8ddd80f96 Greater spec compliance for class properties (#4544)
* Desugar class properties to Object.defineProperty per spec
* Define uninitialized static class properties with value=undefined
* Make class-properties increased spec compliance opt-in (spec: true)
2016-11-15 16:35:51 -05:00

25 lines
791 B
JavaScript

function withContext(ComposedComponent) {
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(WithContext, _Component);
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
}
return WithContext;
}(Component), Object.defineProperty(_class, "propTypes", {
enumerable: true,
writable: true,
value: {
context: PropTypes.shape({
addCss: PropTypes.func,
setTitle: PropTypes.func,
setMeta: PropTypes.func
})
}
}), _temp;
}