diff options
| -rw-r--r-- | example.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,10 +5,10 @@ var ee = mitt() ee .on('*', (type, arg) => console.log('wildcard:', type, arg)) - .on('foo', (one, two, three) => console.log('foo1:', one, two, three)) - .on('foo', (one, two, three) => console.log('foo2:', one, two, three)) - .on('bar', (arg) => console.log('bar:', arg)) - .emit('foo', 1, 2, 3) + .on('foo', (one, c) => console.log('foo1:', one)) // => 1 + .on('foo', (one) => console.log('foo2:', one)) // => 1 + .on('bar', (arg) => console.log('bar:', arg)) // => 444 + .emit('foo', 1, 2, 3) // we not support multiple arguments .emit('bar', 444) console.log(ee.all) |
