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

fixed bug where all events had to have handlers in hooks #193

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdpigeon
Copy link
Contributor

I was trying to use the hooks option to set some logic today and discovered that the typing is wrong currently and requires handlers to be provided for ALL event types if using this option:

// ...
        hooks: {
          run: eventHandler,
        },
// Throwing error related to missing ""before:prepare", prepare, render, end", etc.
// ...

This type change allows the previous code to be valid

@jdpigeon
Copy link
Contributor Author

Unlike most index signatures, I think this requires all instances of EventName to be present specifically because the index signature is an enum

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.

None yet

1 participant