Hi all
Now we have a great syntax improvement that allows us to put comma at the
end of arguments lists, object and array definitions. So in multiline
definition last line could have the same signature as others (not only in
multiline, but multiline definition benefits the most).
I would like to propose syntax that would allow to each line looks like the
last:
const object = {
x: 1
y: 2
z: 3
}
The rule here: for multiline arguments list, object or array declaration if
line is a complete statement and next line is not an operator than consider
it as complete argument (field, element) declaration.
Not an operator so you could use
const condition = true
const objext = {
x: condition
? 0
: 1
y: 2
z: 3
}
It is really like ASI but without bugs with "[", "(" and "/" - they should
be consider as a start of a new declaration
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss