blob: b8cdda3079a8544bd8c9c389ef32c09580210d9c [file] [log] [blame]
40 columns |
>>> Unsplit.
var list = [ ... a,...b, ...
c];
<<<
var list = [...a, ...b, ...c];
>>> Don't split after `...`.
var list = [...comicallyLongIdentifierThatOverflows];
<<<
var list = [
...comicallyLongIdentifierThatOverflows,
];
>>> Null-aware.
var list = [ ...? a,...?b, ...?
c];
<<<
var list = [...?a, ...?b, ...?c];
>>> Don't split after `...?`.
var list = [...?comicallyLongIdentifierThatOverflows];
<<<
var list = [
...?comicallyLongIdentifierThatOverflows,
];
>>> Split inside spread expression.
var list = [1, ...some + very + long + spread + expression, 3];
<<<
var list = [
1,
...some +
very +
long +
spread +
expression,
3,
];
>>> Spread function expression.
var list = [1, ...() { body; }, 4];
<<<
var list = [
1,
...() {
body;
},
4,
];
>>> Spread immediately invoked function expression.
var list = [1, ...() sync* { yield thing; }(), 4];
<<<
var list = [
1,
...() sync* {
yield thing;
}(),
4,
];
>>> Spread cascade.
var list = [1, ...thing..cascade()..another(), 4];
<<<
var list = [
1,
...thing
..cascade()
..another(),
4,
];