Files
babel/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/read-only/exec.js
2021-02-12 14:33:23 +01:00

10 lines
113 B
JavaScript

class A {
#method() {}
run() {
this.#method = 2;
}
}
expect(() => new A().run()).toThrow(TypeError);