mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
14 lines
251 B
JavaScript
14 lines
251 B
JavaScript
const e = match (x) {
|
|
"s" | true | null => 1,
|
|
| "s"
|
|
| true
|
|
| null => 1,
|
|
{foo: 1 | 2} => 2,
|
|
{foo: | 1
|
|
| 2} => 2,
|
|
{foo: [1] as y} => y,
|
|
{foo: 1 | 2 | 3 as y} => y,
|
|
{foo: (1 | 2 | 3) as y} => y,
|
|
{foo: [1] as const y} => y,
|
|
};
|