From b018b05c5c608269bf6c804626e0201f3071c5b3 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 8 Oct 2022 20:59:21 +0200 Subject: [PATCH] add type annotations --- packages/client/src/components/marquee.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/marquee.vue b/packages/client/src/components/marquee.vue index 9721e2e87..2088c5ed8 100644 --- a/packages/client/src/components/marquee.vue +++ b/packages/client/src/components/marquee.vue @@ -23,9 +23,9 @@ const props = withDefaults(defineProps<{ reverse: false, }); -let contentEl = $ref(); +let contentEl: HTMLElement = $ref(); -function calc() { +function calc(): void { const eachLength = contentEl.offsetWidth / props.repeat; const factor = 3000; const duration = props.duration / ((1 / eachLength) * factor);