Comparing version 0.1.0 to 0.2.0
@@ -1,2 +0,2 @@ | ||
type Event<Input, Output> = { | ||
export type Event<Input, Output> = { | ||
input: Input; | ||
@@ -9,6 +9,6 @@ output: Output; | ||
emit: <Key_1 extends keyof EMap>(key: Key_1, data: EMap[Key_1]["input"]) => EMap[Key_1]["output"][]; | ||
onReply: <Key_2 extends keyof EMap>(key: Key_2, listener: (args: EMap[Key_2]["output"]) => void) => void; | ||
onReply: <Key_2 extends keyof EMap>(key: Key_2, listener: (input: EMap[Key_2]["input"], output: EMap[Key_2]["output"][]) => void) => void; | ||
off: <Key_3 extends keyof EMap>(key: Key_3, listener?: ((args: EMap[Key_3]["input"]) => EMap[Key_3]["output"]) | undefined) => void; | ||
offReply: <Key_4 extends keyof EMap>(key: Key_4, listener?: ((args: EMap[Key_4]["input"]) => EMap[Key_4]["output"]) | undefined) => void; | ||
offReply: <Key_4 extends keyof EMap>(key: Key_4, listener?: ((input: EMap[Key_4]["input"], output: EMap[Key_4]["output"][]) => void) | undefined) => void; | ||
}; | ||
export {}; |
@@ -33,3 +33,3 @@ function emmi() { | ||
const fn = rl[i]; | ||
fn(replies); | ||
fn(data, replies); | ||
} | ||
@@ -36,0 +36,0 @@ return replies; |
{ | ||
"name": "emmi", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs", |
Sorry, the diff of this file is not supported yet
5031
5
149