Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Update 'onCaughtError' type inference in 'RenderOptions' to work with React v19 #1401

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

Open
aicest wants to merge 1 commit into testing-library:main
base: main
Choose a base branch
Loading
from aicest:pr/react-19-types-on-caught-error

Conversation

Copy link

@aicest aicest commented May 28, 2025
edited
Loading

What: To fix incorrect onCaughtError type inference in RenderOptions.

Repro: https://codesandbox.io/p/devbox/delicate-voice-7wnf7z?file=%2Ftest%2Frender.test-d.ts%3A6%2C5-6%2C28

Screenshot 2025年05月28日 at 23 40 10

Why: As explained above.

How: Update TS types.

Checklist:

  • Documentation added to the
    docs site
  • Tests
    - React v18 types: No impact
    - React v19 types: Fixed
  • TypeScript definitions updated
  • Ready to be merged

eps1lon reacted with thumbs up emoji
Copy link

codesandbox-ci bot commented May 28, 2025
edited
Loading

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f68378e:

Sandbox Source
react-testing-library-examples Configuration

@aicest aicest force-pushed the pr/react-19-types-on-caught-error branch from 8f80520 to 94b3245 Compare May 28, 2025 16:31
Copy link
Author

aicest commented May 28, 2025

Type checking failed.

image

Solution: fb55/entities#1851

Workaround: Set skipLibCheck in tsconfig.json to true

@aicest aicest force-pushed the pr/react-19-types-on-caught-error branch 2 times, most recently from 5833132 to e64d1b8 Compare May 28, 2025 17:20
@aicest aicest force-pushed the pr/react-19-types-on-caught-error branch from e64d1b8 to f68378e Compare May 29, 2025 09:52
@aicest aicest requested a review from eps1lon May 30, 2025 03:39
Copy link
Member

eps1lon commented May 30, 2025

Typechecking is failing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@eps1lon eps1lon eps1lon approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /