-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript: 0.8.1 breaks re-exported on
#78
Comments
@SimenB would you expect your re-exported listener to be able to listen to the internal events of the event emitter? |
Not really, that's more of an implementation detail. So for my use case that's not needed 🙂 |
Ok, in that case I think you should just add an explicit type annotation like the TS compiler suggests! My bad for accidentally causing this breaking change, but I think in this case the compiler is right, and this just surfaced an error that was hidden by the incorrect bits in |
If @sindresorhus we could yank 0.8.1 and republish as 0.9, but I think this rebinding use case is pretty niche and 0.8.1 has been out for long enough that would cause a lot of chagrin on all the other adopters |
I don't see the point of yanking the current version. Maybe we should improve the docs though. |
This is still an issue, where one wish to make a library that uses this one. declare const listenerAdded: unique symbol;
declare const listenerRemoved: unique symbol;
export {
listenerAdded,
listenerRemoved
} It's for the ability to generate declarations. |
@beckend want to make a PR? |
@airhorns did the minimal touch |
Using 0.8.0 this works fine, but upgrading to 0.8.1 gives
Comes from #73.
I've put together a small repo showing this: https://github.com/SimenB/emittery-type-error.
Note that this only happens if you produce
declaration
files from sourceThe text was updated successfully, but these errors were encountered: