• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//// [privateNameConstructorReserved.ts]
2class A {
3    #constructor() {}      // Error: `#constructor` is a reserved word.
4}
5
6
7//// [privateNameConstructorReserved.js]
8var _A_instances, _A_constructor;
9class A {
10    constructor() {
11        _A_instances.add(this);
12    }
13    #constructor() { } // Error: `#constructor` is a reserved word.
14}
15_A_instances = new WeakSet();
16