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

Change type of the all property in the constructor #73

Merged
merged 2 commits into from Sep 19, 2018

Conversation

@jesperzach
Copy link
Contributor

@jesperzach jesperzach commented Feb 21, 2018

This commit corrects the type of the all property in the mitt constructor function, such that it properly reflects a list of Handler functions rather than a single Handler function.

This makes it possible to provide an argument to the all property in TypeScript projects without casting the argument to the any type and with proper type feedback.

jesperzach and others added 2 commits Feb 21, 2018
This commit corrects the type of the `all` property in the `mitt` constructor function, such that it properly reflects a list of `Handler` functions rather than a single `Handler` function.

This makes it possible to provide an argument to the `all` property in TypeScript projects without casting the argument to the `any` type and with proper error feedback.
Copy link
Owner

@developit developit left a comment

Great, thanks!

@developit developit merged commit bcbe163 into developit:master Sep 19, 2018
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
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.