Fix type errors
This commit is contained in:
parent
5a7553f902
commit
cb9f8c30c9
@ -1,7 +1,7 @@
|
||||
export class Throttler {
|
||||
private hasBeenCalledWithinTime = false;
|
||||
private lastCallFunc: (() => Promise<any>) | null = null;
|
||||
private timeout: int | null = null;
|
||||
private timeout: number | null = null;
|
||||
|
||||
public constructor(private minimumTimeBetweenCall: number) {}
|
||||
|
||||
|
@ -38,7 +38,7 @@ async function fetchZipCode({
|
||||
.catch(() => null as never);
|
||||
}
|
||||
|
||||
let currentBoundary;
|
||||
let currentBoundary: Array<number> | 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<HTMLParagraphElement>("#zip-code")!,
|
||||
response.nr,
|
||||
response.navn,
|
||||
response.visueltcenter ? { longitude: response.visueltcenter[0], latitude: response.visueltcenter[1] } : null,
|
||||
|
Loading…
Reference in New Issue
Block a user