()
| 310 | } |
| 311 | |
| 312 | public statistics(): IndexStatistics { |
| 313 | // Count unique values |
| 314 | const uniqueValues = new Set<number | string>(); |
| 315 | for (const entry of this.#entries) { |
| 316 | uniqueValues.add(entry.value); |
| 317 | } |
| 318 | |
| 319 | return { |
| 320 | entries: this.#entries.length, |
| 321 | uniqueValues: uniqueValues.size, |
| 322 | }; |
| 323 | } |
| 324 | } |