Currently, shorthand properties are incorrectly replaced as seen below:
var x = 23,
y = {x};
// =>
var _rec.x = 23;
_rec.y = { _rec.x };
The resulting AST is not correct anymore because you cannot use a property expression as key. This PR ensures that the key and value of short-hand properties is split up and only the value gets replaced by the capturing expression.
Currently, shorthand properties are incorrectly replaced as seen below:
The resulting AST is not correct anymore because you cannot use a property expression as key. This PR ensures that the key and value of short-hand properties is split up and only the value gets replaced by the capturing expression.