packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-methods--to-es2015/static-private/exec.js
raw symbols SCIP| 1 | function dec(fn, context) { |
| 2 | return function () { |
| 3 | return fn.call(this) + 1; |
| 4 | } |
| 5 | } |
| 6 | |
| 7 | class Foo { |
| 8 | static value = 1; |
| 9 | |
| 10 | @dec |
| 11 | static #a() { |
| 12 | return this.value; |
| 13 | } |
| 14 | |
| 15 | static callA() { |
| 16 | return this.#a(); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | expect(Foo.callA()).toBe(2); |
| 21 | Foo.value = 123; |
| 22 | expect(Foo.callA()).toBe(124); |