764 B
764 B
Support record and tuple syntax (#8453 by @fisker)
Support Stage-1 proposal JavaScript Records & Tuples Proposal.
Only support #[]/#{} syntax, not {| |} / [| |].
Tuples
// Input
#[1, 2, 3]
// Prettier stable
SyntaxError: Unexpected token (1:1)
> 1 | #[1, 2, 3]
| ^
// Prettier master
#[1, 2, 3];
Records
// Input
#{
a: 1,
b: 2,
c: 3,
}
// Prettier stable
SyntaxError: Unexpected token (1:1)
> 1 | #{
| ^
2 | a: 1,
3 | b: 2,
4 | c: 3,
// Prettier master
#{
a: 1,
b: 2,
c: 3,
};