Debian Codegraph @

packages/babel-plugin-transform-new-target/test/fixtures/general/class-properties/input.js

raw
1 class Foo {
2 constructor() {
3 this.Bar = class {
4 static p = new.target
5 static p1 = class { constructor() { new.target } } // should not replace
6 static p2 = new function () { new.target } // should not replace
7 static p3 = () => { new.target } // should replace
8 static p4 = function () { new.target } // should not replace
9 q = new.target // should not replace
10 }
11 }
12
13 test = function() {
14 new.target;
15 };
16
17 test2 = () => {
18 new.target;
19 }
20 }