Skip to content
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

Migrate to TypeScript and use Map #99

Merged
merged 10 commits into from
May 26, 2020

Conversation

jackfranklin
Copy link
Contributor

@jackfranklin jackfranklin commented May 20, 2020

This PR:

  • migrates the internal events object to be a Map, rather than an object.
  • migrates src/index.js to TypeScript
  • updates the bundling to use Microbundle and drops all the custom rollup builds
  • removes any reference to Flow types
  • updates the TS types to allow event types to be a string or symbol (now we're using a Map they could theoretically be anything).
  • adds ESLint TypeScript rules

Important to note this is very much a breaking change for multiple reasons!

@developit I'm happy to update the CHANGELOG once this is good to ship.

@jackfranklin jackfranklin changed the title Migrate codebase to TypeScript Migrate to TypeScript and use Map May 21, 2020
Copy link
Owner

@developit developit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's within 3 bytes! :D

@developit developit merged commit be5237f into developit:master May 26, 2020
@developit
Copy link
Owner

Published as 2.0.0 (prerelease) - install it via npm install mitt@next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants