Skip to content

Commit 214806e

Browse files
committed
Added type Listener
1 parent 4a50638 commit 214806e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-element",
3-
"version": "0.0.222",
3+
"version": "0.0.223",
44
"description": "",
55
"license": "LGPL-3.0",
66
"main": "./index.js",

src/main/js-element.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
export { component, createCtx, elem, intercept, prop, setMethods, Attrs }
55

66
// types
7-
export { Ctx, Ctrl, MethodsOf }
7+
export { Ctx, Ctrl, MethodsOf, Listener }
88

99
// === data ==========================================================
1010

@@ -70,6 +70,8 @@ type Ctx<T> = Readonly<{
7070
defaultValue: T
7171
}>
7272

73+
type Listener<T> = (v: T) => void
74+
7375
// === decorators (all public) =======================================
7476

7577
function elem<E extends Component, C>(params: {

0 commit comments

Comments
 (0)