web: add Optional type and use it

This commit is contained in:
dumbmoron
2024-07-21 17:26:21 +00:00
parent f93f3cd558
commit bb446ecf3e
7 changed files with 19 additions and 11 deletions

View File

@@ -9,6 +9,7 @@
import { updateSetting } from "$lib/state/settings";
import type { DownloadModeOption } from "$lib/types/settings";
import type { Optional } from "$lib/types/generic";
import IconLink from "@tabler/icons-svelte/IconLink.svelte";
@@ -25,7 +26,7 @@
import IconClipboard from "$lib/icons/Clipboard.svelte";
let link: string = "";
let linkInput: HTMLInputElement | undefined;
let linkInput: Optional<HTMLInputElement>;
let isFocused = false;
let isDisabled: boolean = false;