lazy_set: Move the size getter above other methods.

This is to avoid @typescript-eslint/member-ordering error when this
module is converted to typescript.
This commit is contained in:
Priyank Patel
2021-12-28 18:20:15 +00:00
committed by Tim Abbott
parent 16a3d444fd
commit 84958bf7eb

View File

@@ -30,6 +30,15 @@ export class LazySet {
};
}
get size() {
const {data} = this;
if (data.set !== undefined) {
return data.set.size;
}
return data.arr.length;
}
keys() {
const {data} = this;
if (data.set !== undefined) {
@@ -49,15 +58,6 @@ export class LazySet {
};
}
get size() {
const {data} = this;
if (data.set !== undefined) {
return data.set.size;
}
return data.arr.length;
}
map(f) {
return Array.from(this.keys(), f);
}