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

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