Start framework refactor

This commit is contained in:
2025-10-20 12:45:06 +02:00
parent d35a47e4b0
commit b156ddedb9
8 changed files with 335 additions and 243 deletions

View File

@@ -4,6 +4,7 @@ export interface Ref<T> {
'setConditionalElements': ( elements: HTMLElement[] ) => void;
'addConditionalClasses': ( element: HTMLElement, onTrue: string, onFalse: string ) => void;
'bind': ( element: HTMLInputElement, castFunction: ( val: string ) => T ) => void;
'onChange': ( callback: () => void ) => void;
}
export interface ListRef<T> {
@@ -12,6 +13,7 @@ export interface ListRef<T> {
'sort': ( compare: ( a: T, b: T ) => number ) => void;
'filter': ( predicate: ( value: T ) => boolean ) => void;
'setTemplate': ( newTemplate: RenderTemplate ) => void;
'onChange': ( callback: () => void ) => void;
}
export type HTMLTagNames = keyof HTMLElementTagNameMap;