sindresorhus/emittery

Support Symbol as `eventName` #16

sindresorhus posted onGitHub

See https://github.com/sindresorhus/emittery/issues/12#issuecomment-348813948 for use-case.

I think #13 should be implemented first though, so we can make sure it's not hard to define in a TS type definition.


Note: This issue has a bounty, so it's expected that you are an experienced programmer and that you give it your best effort if you intend to tackle this. Don't forget, if applicable, to add tests, docs (double-check for typos), and update TypeScript definitions. And don't be sloppy. Review your own diff multiple times and try to find ways to improve and simplify your code. Instead of asking too many questions, present solutions. The point of an issue bounty is to reduce my workload, not give me more. Include a 🦄 in your PR description to indicate that you've read this. Thanks for helping out 🙌 - @sindresorhus


We'll be able to support this in the Emittery class itself, but TypeScript cannot yet express symbol types sufficiently for use in the Emittery.Typed class. That's OK though, we can definitely tackle this now.

posted by novemberborn over 7 years ago
posted by sindresorhus about 7 years ago

AFAIK, the support is still limited: they cannot be use with keyOf or as index signature parameter. It can be used in overloaded method signatures however.

posted by dinoboff about 7 years ago
posted by sindresorhus about 7 years ago

The above issues has been fixed.

posted by sindresorhus over 5 years ago

@issuehunt has funded $60.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

@sindresorhus has rewarded $54.00 to @stroncium. See it on IssueHunt

  • :moneybag: Total deposit: $60.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $6.00
posted by issuehunt-app[bot] about 5 years ago

Fund this Issue

$60.00
Rewarded

Rewarded pull request

Recent activities

stroncium was rewarded by sindresorhus for sindresorhus/emittery# 16
about 5 years ago
stroncium submitted an output to  sindresorhus/ emittery# 16
over 5 years ago