Debian Codegraph @

packages/babel-plugin-proposal-decorators/test/fixtures/2018-09-duplicated-keys/create-existing-element-with-extras/exec.js

raw symbols SCIP
1 function decorate(el) {
2 el.extras = [{
3 kind: "method",
4 key: "foo",
5 descriptor: {
6 enumerable: true,
7 configurable: true,
8 writable: true,
9 value: function() {},
10 }
11 }];
12
13 return el;
14 }
15
16 expect(() => {
17 class A {
18 @decorate
19 bar() {}
20
21 foo() {}
22 }
23 }).toThrow(TypeError);
24
25