From cb9f8c30c901672ae5513acd988a067a07a89870 Mon Sep 17 00:00:00 2001 From: ReiMerc Date: Fri, 10 Feb 2023 09:16:15 +0100 Subject: [PATCH] Fix type errors --- frontend/src/Throttler.ts | 2 +- frontend/src/main.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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,