The following code
function foo(bar) {
console.log(foo['hello']);
}
foo({hello: 'world'});
Gets incorrectly transpiled to
foo(bar) {
console.log(foo["hello"]);
}
foo(hello: "world");
Only when the object keys are strings ( foo({'hello': 'world'}) ) the transpiler generates the correct output
foo(bar) {
console.log(foo["hello"]);
}
foo({"hello": "world"});