fix: Update 'onCaughtError' type inference in 'RenderOptions' to work with React v19 by aicest · Pull Request #1401 · testing-library/react-testing-library · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aicest
Copy link

@aicest aicest commented May 28, 2025

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

Copy link

codesandbox-ci bot commented May 28, 2025

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
@aicest
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
@eps1lon
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.