Debian Codegraph @

packages/babel-plugin-proposal-decorators/test/fixtures/2022-03-methods--to-es2015/static-public/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 @dec
16 static ['b']() {
17 return this.value;
18 }
19 }
20
21 expect(Foo.a()).toBe(2);
22 expect(Foo.b()).toBe(2);
23 Foo.value = 123;
24 expect(Foo.a()).toBe(124);
25 expect(Foo.b()).toBe(124);