mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
Fix ontime aux actions (#1684)
* switch to base ui * ensure all action types is part of the valitation * update test * atempt to do it in the base-ui way * fix fixing * allow undefide visible on set timer message * fix set time not showing * correct time data for aux set automation --------- Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
committed by
GitHub
parent
8d68a4554d
commit
4d359445a7
@@ -1,5 +1,11 @@
|
||||
import { is } from './is.js';
|
||||
|
||||
export function isBoolean(value: unknown): asserts value is boolean {
|
||||
if (!is.boolean(value)) {
|
||||
throw new Error(`Unexpected payload type: ${String(value)}`);
|
||||
}
|
||||
}
|
||||
|
||||
export function isString(value: unknown): asserts value is string {
|
||||
if (!is.string(value)) {
|
||||
throw new Error(`Unexpected payload type: ${String(value)}`);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export const is = {
|
||||
boolean: (value: unknown): value is boolean => typeof value === 'boolean',
|
||||
string: (value: unknown): value is string => typeof value === 'string',
|
||||
number: (value: unknown): value is number => typeof value === 'number',
|
||||
defined: <T>(value: T | undefined): value is T => value !== undefined,
|
||||
|
||||
Reference in New Issue
Block a user