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

Improve Enzyme's type declaration #62

Closed
wants to merge 1 commit into from
Closed

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Dec 17, 2024

Improve a bit our ReactWrapper definition based on the methods/properties we use and definitely typed definition.

The official definition has more stuff, but I decided to keep it simple as a POC. I checked which methods we use in client, but we may need to enhance this definition based on the usage in other projects.

Considerations

We are currently not shipping these types with the library, but we probably should, otherwise downstream code won't benefit of these changes.

@acelaya
Copy link
Contributor Author

acelaya commented Dec 18, 2024

We have agreed the right way to solve this is to keep enzyme.d.ts as is, as those are the only methods from enzyme that this library relies on.

All the extra methods will be exposed from this library as the type that our own mount implementation returns, and that type definition will be shipped with the library.

More details on the discussion can be found in slack https://hypothes-is.slack.com/archives/C1M8NH76X/p1734433461012719

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