Skip to content

Modern Docker Management, Designed for Everyone

refactor: improve types on loading indicator

Kyle Mendell2118d6fddcf7
diff --git a/frontend/src/lib/components/loading-indicator.svelte b/frontend/src/lib/components/loading-indicator.svelte
index ef45c2e6d..7f953f7c0 100644
--- a/frontend/src/lib/components/loading-indicator.svelte
+++ b/frontend/src/lib/components/loading-indicator.svelte
@@ -1,23 +1,20 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages';
- let {
- active = false,
- delay = 80,
- minDuration = 350,
- thickness = 'h-2',
- class: className = ''
- }: {
+
+ interface Props {
active?: boolean;
delay?: number;
minDuration?: number;
thickness?: string;
class?: string;
- } = $props();
+ }
+
+ let { active = false, delay = 80, minDuration = 350, thickness = 'h-2', class: className = '' }: Props = $props();
let visible = $state(false);
let startedAt = 0;
- let showTO: any;
- let hideTO: any;
+ let showTO: ReturnType<typeof setTimeout> | undefined;
+ let hideTO: ReturnType<typeof setTimeout> | undefined;
function clearTimers() {
clearTimeout(showTO);