add type annotations

This commit is contained in:
Johann150 2022-10-08 20:59:21 +02:00 committed by Francis Dinh
parent b95f90eb15
commit b018b05c5c
Signed by untrusted user: norm
GPG Key ID: 7123E30E441E80DE
1 changed files with 2 additions and 2 deletions

View File

@ -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);