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:
Alex Christoffer Rasmussen
2025-07-09 13:14:23 +02:00
committed by GitHub
parent 8d68a4554d
commit 4d359445a7
12 changed files with 141 additions and 89 deletions
+6
View File
@@ -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
View File
@@ -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,