* Update member-expression-to-functions 1. Babel using British spellings, so `memoise` 2. Provide a helper `AssignmentMemoiser` class, which will assign the memo'd value with the `n`th access. * Private properties! * Fixes * Tests * Update helper name * Fix privates that reference other privates * Don't extend a builtin * Rebase
16 lines
231 B
JavaScript
16 lines
231 B
JavaScript
class Foo {
|
|
#foo = function() {
|
|
return this;
|
|
}
|
|
|
|
test(other) {
|
|
return [this.#foo(), other.#foo()];
|
|
}
|
|
}
|
|
|
|
const f = new Foo;
|
|
const o = new Foo;
|
|
const test = f.test(o);
|
|
expect(test[0]).toBe(f);
|
|
expect(test[1]).toBe(o);
|