mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +03:00
53b031b019
swc_ecma_transforms_base: - `resolver`: Handle constructor properties correctly. (#2021) swc_ecma_transforms_compat: - `block_scoping`: Handle arrows in loops. (#2027) - `block_scoping`: Handle nested for loops with function between them. (#2027) - `regenerator`: Handle rhs of `||` correctly. (#2024) swc: - Add a test for #1734. (#1734)
20 lines
440 B
JavaScript
20 lines
440 B
JavaScript
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
return obj;
|
|
}
|
|
class Item extends Component {
|
|
constructor(props){
|
|
super(props);
|
|
_defineProperty(this, "input", this.props.item);
|
|
}
|
|
}
|