diff --git a/ts/graphs/card-counts.ts b/ts/graphs/card-counts.ts index 7451466c1..f45bca720 100644 --- a/ts/graphs/card-counts.ts +++ b/ts/graphs/card-counts.ts @@ -197,7 +197,7 @@ export function renderCards( x.range([bounds.marginLeft, bounds.width - bounds.marginRight]); - const tableData = (data as any).flatMap((d: SummedDatum, idx: number) => { + const tableData = data.flatMap((d: SummedDatum, idx: number) => { const percent = ((d.count / xMax) * 100).toFixed(1); return d.show ? ({ diff --git a/ts/graphs/intervals.ts b/ts/graphs/intervals.ts index 613c809a8..c37363fe2 100644 --- a/ts/graphs/intervals.ts +++ b/ts/graphs/intervals.ts @@ -108,9 +108,7 @@ export function prepareIntervalData( const bins = histogram() .domain(scale.domain() as [number, number]) - .thresholds((scale.ticks(desiredBars) as any).flatMap(adjustTicks))( - allIntervals - ); + .thresholds(scale.ticks(desiredBars).flatMap(adjustTicks))(allIntervals); // empty graph? const totalInPeriod = sum(bins, (bin) => bin.length); diff --git a/ts/tsconfig.json b/ts/tsconfig.json index e359b52a0..c53d47021 100644 --- a/ts/tsconfig.json +++ b/ts/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "target": "es6", "module": "es6", - "lib": ["es2016", "dom"], + "lib": ["es2016", "es2019.array", "dom"], "baseUrl": ".", "paths": { "anki/*": ["../bazel-bin/ts/lib/*"]