return types in typescript

This commit is contained in:
rhiannon morris 2025-01-31 18:38:51 +01:00
parent 42089136e1
commit 510906437f
3 changed files with 22 additions and 22 deletions

View file

@ -28,7 +28,7 @@ function setImage(id: string, src: string, href: string,
if (curCw && !coverNew) {
// keep old cover until load
function removeCover() { setTimeout(() => openCW(null, curCw!), 100); }
function removeCover(): void { setTimeout(() => openCW(null, curCw!), 100); }
mainimg.addEventListener('load', removeCover, {once: true});
} else if (coverNew) {
// place new cover
@ -82,7 +82,7 @@ function useFragment(firstLoad = false): void {
}
}
function setup() {
function setup(): void {
mainfig = document.getElementById('mainfig')!;
mainimg = document.getElementById('mainimg') as HTMLImageElement;
mainlink = document.getElementById('mainlink') as HTMLAnchorElement;