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
Merged

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
@jackfranklin jackfranklin mentioned this pull request May 21, 2020
2 of 2 tasks complete
@developit developit self-requested a review May 26, 2020
@developit developit mentioned this pull request May 26, 2020
Copy link
Owner

@developit developit left a comment

It's within 3 bytes! :D

@developit developit merged commit be5237f into developit:master May 26, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@developit
Copy link
Owner

@developit developit commented May 26, 2020

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.