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

@@ -1,10 +1,11 @@
<script lang="ts">
import Skeleton from "$components/misc/Skeleton.svelte";
import type { Optional } from "$lib/types/generic";
export let version: string;
export let title: string;
export let date: string;
export let banner: { file: string; alt: string } | undefined;
export let banner: Optional<{ file: string; alt: string }>;
let bannerLoaded = false;