mini-van-plate
Advanced tools
Comparing version 0.5.4 to 0.5.5
{ | ||
"name": "mini-van-plate", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"description": "A minimalist template engine for DOM generation and manipulation, working for both client-side and server-side rendering", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -50,4 +50,7 @@ export interface State<T> { | ||
declare function state<T>(): State<T> | ||
declare function state<T>(initVal: T): State<T> | ||
export interface VanObj<ElementType extends HasFirstChild, TextNodeType> { | ||
readonly state: <T>(initVal?: T) => State<T> | ||
readonly state: typeof state | ||
readonly derive: <T>(f: () => T) => State<T> | ||
@@ -54,0 +57,0 @@ readonly add: AddFunc<ElementType, TextNodeType> |
@@ -8,4 +8,6 @@ export interface State<T> { | ||
export type PropValue = Primitive | ((e: any) => void) | null; | ||
declare function state<T>(): State<T>; | ||
declare function state<T>(initVal: T): State<T>; | ||
export interface VanObj { | ||
readonly state: <T>(initVal?: T) => State<T>; | ||
readonly state: typeof state; | ||
readonly derive: <T>(f: () => T) => State<T>; | ||
@@ -15,1 +17,2 @@ readonly add: Function; | ||
} | ||
export {}; |
@@ -26,4 +26,7 @@ export interface State<T> { | ||
declare function state<T>(): State<T> | ||
declare function state<T>(initVal: T): State<T> | ||
export interface Van { | ||
readonly state: <T>(initVal?: T) => State<T> | ||
readonly state: typeof state | ||
readonly derive: <T>(f: () => T) => State<T> | ||
@@ -30,0 +33,0 @@ readonly add: (dom: Element, ...children: readonly ChildDom[]) => Element |
21738
211