global: snapshot

This commit is contained in:
nym21
2026-02-27 18:48:37 +01:00
parent 6845ad409b
commit d5ec291579
62 changed files with 1960 additions and 1449 deletions

View File

@@ -87,7 +87,7 @@ export function createChart({ parent, brk, fitContent }) {
const getTimeEndpoint = (idx) =>
idx === "height"
? brk.metrics.blocks.time.timestampMonotonic.by[idx]
: brk.metrics.blocks.time.timestamp.by[idx];
: /** @type {any} */ (brk.metrics.blocks.time.timestamp)[idx].by[idx];
const index = {
/** @type {Set<(index: ChartableIndex) => void>} */
@@ -137,7 +137,7 @@ export function createChart({ parent, brk, fitContent }) {
if (cached) {
this.data = cached;
}
endpoint.slice(-10000).fetch((result) => {
endpoint.slice(-10000).fetch((/** @type {any} */ result) => {
if (currentGen !== generation) return;
cache.set(endpoint.path, result);
this.data = result;