packages/babel-plugin-proposal-decorators/test/fixtures/2022-03-methods--to-es2015/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 | value = 1; |
| 9 | |
| 10 | @dec |
| 11 | #a() { |
| 12 | return this.value; |
| 13 | } |
| 14 | |
| 15 | callA() { |
| 16 | return this.#a(); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | let foo = new Foo(); |
| 21 | |
| 22 | expect(foo.callA()).toBe(2); |
| 23 | foo.value = 123; |
| 24 | expect(foo.callA()).toBe(124); |