Skip to content

feat: Support exactOptionalPropertyTypes on ErrorBoundary #9098

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

Merged
merged 1 commit into from
Nov 28, 2023
Merged

feat: Support exactOptionalPropertyTypes on ErrorBoundary #9098

merged 1 commit into from
Nov 28, 2023

Conversation

quisido
Copy link
Contributor

@quisido quisido commented Sep 25, 2023

TypeScript has a exactOptionalPropertyTypes flag that uses stricter typing on objects.

type T = { property?: V } means T['property'] V or !('property' in T), but T['property'] cannot === undefined.

This means that consumers of @sentry/react who have exactOptionalPropertyTypes enabled cannot set an ErrorBoundary prop to undefined without hard-failing TypeScript transpilation.

This PR attempts to fix that.

@getsantry
Copy link

getsantry bot commented Oct 18, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Oct 18, 2023
@quisido
Copy link
Contributor Author

quisido commented Oct 18, 2023

Please review 🙏

@quisido
Copy link
Contributor Author

quisido commented Nov 25, 2023

@HazAT @lforst What is the process for getting a PR reviewed?

@lforst
Copy link
Contributor

lforst commented Nov 27, 2023

Sorry, this slipped through. We don't have proper channels in place for community PRs and we need to improve this.

I will look at this PR this week in a sec!

@lforst lforst changed the title support exactOptionalPropertyTypes on ErrorBoundary feat: Support exactOptionalPropertyTypes on ErrorBoundary Nov 27, 2023
@quisido
Copy link
Contributor Author

quisido commented Nov 27, 2023

@lforst Thank you. I rebased through the PR UI. Hopefully it's mergeable soon.

@lforst
Copy link
Contributor

lforst commented Nov 28, 2023

Thank you!

@lforst lforst merged commit 3a96b23 into getsentry:develop Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants