mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
refactor: allow import of blocks and skip import (#735)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user