| 1 |
const foo = "foo"; |
| 2 |
const bar = () => {}; |
| 3 |
const four = 4; |
| 4 |
|
| 5 |
class MyClass { |
| 6 |
static [one()] = "test"; |
| 7 |
static [2 * 4 + 7] = "247"; |
| 8 |
static [2 * four + 7] = "247"; |
| 9 |
static [2 * four + seven] = "247"; |
| 10 |
[null] = "null"; |
| 11 |
[undefined] = "undefined"; |
| 12 |
[void 0] = "void 0"; |
| 13 |
get ["whatever"]() {} |
| 14 |
set ["whatever"](value) {} |
| 15 |
get [computed()]() {} |
| 16 |
set [computed()](value) {} |
| 17 |
["test" + one]() {} |
| 18 |
static [10]() {} |
| 19 |
[/regex/] = "regex"; |
| 20 |
[foo] = "foo"; |
| 21 |
[bar] = "bar"; |
| 22 |
[baz] = "baz"; |
| 23 |
[`template`] = "template"; |
| 24 |
[`template${expression}`] = "template-with-expression"; |
| 25 |
} |