Closed funmaker closed 5 months ago
Wow thanks for putting this together! I'm happy to merge this. One thing I wonder though is if we can actually remove the pub-sub typing here altogether as I recently added types to the pub-sub-es library. I know that @manzt added the pub-sub types here before pub-sub-es was typed but I think it might be better to fix any type issues in the pub-sub library instead of here.
I know this means more work but would you be willing to see if removing the pub-sub types here fixes the issue? I'm also happy to merge this fix for now and properly refactor things later.
I'm closing this PR as I've refactored pub-sub-es
to TypeScript to fix all the typing issues once and for all. Please let me know if you still run into issues with v1.9.0.
Current pubsub types do not match actual types used by pub-sub-es. This PR fixes them.
Added missing return value in subscribe and added missing argument/overload for unsubscribe. Also added helper types for subscription object and handler.
Because you can't use unsubscribe properly from events right now.
Checklist
CHANGELOG.md
updatedREADME.md
added or updated