return types in typescript
This commit is contained in:
parent
42089136e1
commit
510906437f
3 changed files with 22 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue