From 4cfecd0d6fe951a254ab83a0727a1762c84977dc Mon Sep 17 00:00:00 2001 From: Jamie B <53781962+JamieB-gu@users.noreply.github.com> Date: Thu, 10 Sep 2026 17:21:10 +0100 Subject: [PATCH] Clarify `getElectionData` To make it clearer why it's being passed in, and why the type is `unknown`. --- .../src/components/ElectionTrackers/ElectionTracker.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotcom-rendering/src/components/ElectionTrackers/ElectionTracker.tsx b/dotcom-rendering/src/components/ElectionTrackers/ElectionTracker.tsx index 9185fe3b60c..f979e7ddf10 100644 --- a/dotcom-rendering/src/components/ElectionTrackers/ElectionTracker.tsx +++ b/dotcom-rendering/src/components/ElectionTrackers/ElectionTracker.tsx @@ -24,7 +24,9 @@ type Props = { electionDataUrl: URL; /** * A potentially side-effectful function used to retrieve election data from - * the given URL. The result is a JS object of unknown shape. + * the given URL, allowing for different effects to be passed in different + * environments. The result is a JS object of unknown shape, which will be + * parsed here. */ getElectionData: (url: string) => Promise; /**