fix: remove $State debug message
This commit is contained in:
defaultkavy 2024-05-15 18:54:44 +08:00
parent 7f8f599b8a
commit 72f617df3c
2 changed files with 4 additions and 4 deletions

View File

@ -2,18 +2,18 @@ export interface $StateOption<T> {
format: (value: T) => string;
}
export class $State<T> {
readonly value: T;
readonly value!: T;
readonly attributes = new Map<Object, Set<string | number | symbol>>();
options: Partial<$StateOption<T>> = {}
constructor(value: T, options?: $StateOption<T>) {
this.value = value;
this.set(value);
if (options) this.options = options;
}
set(value: T) {
(this as Mutable<$State<T>>).value = value;
// update element content for eatch attributes
for (const [node, attrList] of this.attributes.entries()) {
for (const attr of attrList) {
console.debug(node, attr)
//@ts-expect-error
if (node[attr] instanceof Function) {
//@ts-expect-error

View File

@ -1,7 +1,7 @@
{
"name": "elexis",
"description": "Build Web in Native JavaScript Syntax",
"version": "0.2.2",
"version": "0.2.3",
"author": {
"name": "defaultkavy",
"email": "defaultkavy@gmail.com",