diff --git a/frontend/src/Throttler.ts b/frontend/src/Throttler.ts index d168c7b..267bf4c 100644 --- a/frontend/src/Throttler.ts +++ b/frontend/src/Throttler.ts @@ -1,7 +1,7 @@ export class Throttler { private hasBeenCalledWithinTime = false; private lastCallFunc: (() => Promise) | null = null; - private timeout: int | null = null; + private timeout: number | null = null; public constructor(private minimumTimeBetweenCall: number) {} diff --git a/frontend/src/main.ts b/frontend/src/main.ts index a3c4b5a..e0ec015 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -38,7 +38,7 @@ async function fetchZipCode({ .catch(() => null as never); } -let currentBoundary; +let currentBoundary: Array | null = null; async function fetchAndDisplayZipCode(coords: Coordinate) { if (currentBoundary && coords.longitude > currentBoundary[0] && @@ -52,7 +52,7 @@ async function fetchAndDisplayZipCode(coords: Coordinate) { currentBoundary = response.bbox; displayZipCode( - document.getElementById("zip-code")!, + document.querySelector("#zip-code")!, response.nr, response.navn, response.visueltcenter ? { longitude: response.visueltcenter[0], latitude: response.visueltcenter[1] } : null,