Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
14 lines
170 B
JavaScript
14 lines
170 B
JavaScript
class Base {
|
|
constructor(obj) {
|
|
return obj;
|
|
}
|
|
}
|
|
|
|
let counter = 0;
|
|
class Derived extends Base {
|
|
#foo = ++counter;
|
|
static get(obj) {
|
|
return obj.#foo;
|
|
}
|
|
}
|