Skip to content

Commit 9680460

Browse files
authored
Clarify getElectionData (#16712)
To make it clearer why it's being passed in, and why the type is `unknown`.
1 parent 0eba245 commit 9680460

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dotcom-rendering/src/components/ElectionTrackers/ElectionTracker.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ type Props = {
2424
electionDataUrl: URL;
2525
/**
2626
* A potentially side-effectful function used to retrieve election data from
27-
* the given URL. The result is a JS object of unknown shape.
27+
* the given URL, allowing for different effects to be passed in different
28+
* environments. The result is a JS object of unknown shape, which will be
29+
* parsed here.
2830
*/
2931
getElectionData: (url: string) => Promise<unknown>;
3032
/**

0 commit comments

Comments
 (0)