refactor: allow import of blocks and skip import (#735)

This commit is contained in:
Carlos Valente
2024-01-27 15:08:01 +01:00
committed by GitHub
parent f6557a9814
commit 86cec56a3d
5 changed files with 61 additions and 17 deletions
@@ -20,6 +20,10 @@ export function validateTimerType(maybeTimerType: unknown, fallback = TimerType.
return Object.values(TimerType).includes(maybeTimerType as TimerType) ? (maybeTimerType as TimerType) : fallback;
}
export function isKnownTimerType(maybeTimerType: unknown) {
return Object.values(TimerType).includes(maybeTimerType as TimerType);
}
/**
* @description calculates event duration considering midnight
* @param {number} timeStart