Jason Miller

Results 1188 comments of Jason Miller
trafficstars

Not sure what would cause this. What is the `npm build` failure you're seeing?

strange.... @prateekbh?

I have no idea what is causing this. [Here's a simplified repro](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBCYMYBo4G84FFHIKZRwC+cAZlBCHAES4zUDcAUEwPStwBU3Pvf-AwUOEjRY8RMkCWMAJ5g8cACoAxAM4AhAIZq8SiBAA2WAG54AdvAC8GJnDhqYW2PqMB+AFwOYUYOYDmzPYAxlrmwXiGroae3r4BzETMTH4wBKRaEXAAkgBGOnoGhgA8SnB4AB5p5gAmasrq2rrRphYwAHy29mmOXgAUal5KAJRwVu0mEMA1QeVmll44SGlQpe2zePMwAOrQANZ+-ot0BKWNBS1b60xELMGGOvVNhUal5VUWdQ2aF0Wtlp1QGBDHgQG16nlfq8lJ10HY5m0xghlms+sMNltdlADgEkXQzj9mn8rmjkt08I44H0wM4tCAhqM4fYQhBzGojHgAHSGCD+am0kCcxzOGDRdEsZlwGAAC2Aak5mzaCtwfQA5MKXEVVei4Ow4AB3aWyOByqWy+paKXyRQEChQNzw+yOs1yhWY-aHZVINUa0Va8X2W5EIA) if anyone has ideas.

I'm not entirely against adding `once()`. Whether it's worthwhile depends on the size impact. Here is a polyfill: ```js function mittWithOnce(all) { const inst = mitt(all); inst.once = (type, fn)...

It looks like Node just punts on this - it removes the first listener, regardless of whether it was added via `once()` or `on()`. On the web, EventTarget supports a...

@juliovedovatto that's how I generally implement this, yep. The reason that solution wouldn't work in Mitt itself is because it becomes impossible to remove a handler added via `once()` using...

That looks a lot like the observed value syntax from Mithril. Separate lib tho :P Think we should rename off? You're right about EE compat, I took that name from...

Not that I know of. It would be relatively easy to set up though.

Hiya - thanks for the PR! Unfortunately, this doesn't work with the strict typings added in #124. More importantly though, I think the size and performance impact of adding variable...