Skip to content

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.

1 participant