From e7be0b5a5d36bb8f38f1e381921ea1d7f35ee011 Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Tue, 17 Oct 2023 10:12:04 +0200 Subject: [PATCH] style: use existing type `ChartTableTransformer` --- packages/@ourworldindata/grapher/src/core/Grapher.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index 6c716680593..348e0207b08 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -177,7 +177,7 @@ import { import classnames from "classnames" import { GrapherAnalytics } from "./GrapherAnalytics" import { legacyToCurrentGrapherQueryParams } from "./GrapherUrlMigrations" -import { ChartInterface } from "../chart/ChartInterface" +import { ChartInterface, ChartTableTransformer } from "../chart/ChartInterface" import { MarimekkoChartManager } from "../stackedCharts/MarimekkoChartConstants" import { AxisConfigInterface } from "../axis/AxisConfigInterface" import Bugsnag from "@bugsnag/js" @@ -811,7 +811,7 @@ export class Grapher @action.bound async downloadLegacyDataFromOwidVariableIds( - inputTableTransformer?: (table: OwidTable) => OwidTable + inputTableTransformer?: ChartTableTransformer ): Promise { if (this.variableIds.length === 0) // No data to download @@ -858,7 +858,7 @@ export class Grapher @action.bound private _setInputTable( json: MultipleOwidVariableDataDimensionsMap, legacyConfig: Partial, - inputTableTransformer?: (table: OwidTable) => OwidTable + inputTableTransformer?: ChartTableTransformer ): void { // TODO grapher model: switch this to downloading multiple data and metadata files const { dimensions, table } = legacyToOwidTableAndDimensions( @@ -884,7 +884,7 @@ export class Grapher } @action rebuildInputOwidTable( - inputTableTransformer?: (table: OwidTable) => OwidTable + inputTableTransformer?: ChartTableTransformer ): void { // TODO grapher model: switch this to downloading multiple data and metadata files if (!this.legacyVariableDataJson) return @@ -900,7 +900,7 @@ export class Grapher @action.bound private _receiveOwidDataAndApplySelection( json: MultipleOwidVariableDataDimensionsMap, - inputTableTransformer?: (table: OwidTable) => OwidTable + inputTableTransformer?: ChartTableTransformer ): void { this.legacyVariableDataJson = json