GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fix: Update 'onCaughtError' type inference in 'RenderOptions' to work with React v19 by aicest · Pull Request #1438 · testing-library/react-testing-library Conversation
|
|
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 a970da6:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes TypeScript type inference for the onCaughtError option in RenderOptions to properly support React 19. The fix addresses an issue where the conditional type check was too strict, requiring the property to be non-optional when React 19's RootOptions defines it as optional.
Key changes:
RenderOptions to check for optional onCaughtError? instead of required onCaughtError@ts-expect-error to @ts-ignore to maintain compatibility with both React 18 and 19 type checking in CICopilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| types/index.d.ts | Made onCaughtError property optional in the conditional type check to match React 19's optional property definition |
| types/test.tsx | Updated test comments and TypeScript directive to use @ts-ignore for cross-version compatibility during CI testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
Hi @eps1lon, could pls help push this forward? Thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🎉 This PR is included in version 16.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [@testing-library/react](https://github.com/testing-library/react-testing-library) | devDependencies | patch | [`16.3.1` → `16.3.2`](https://renovatebot.com/diffs/npm/@testing-library%2freact/16.3.1/16.3.2) | [](https://securityscorecards.dev/viewer/?uri=github.com/testing-library/react-testing-library) | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | devDependencies | patch | [`19.2.8` → `19.2.9`](https://renovatebot.com/diffs/npm/@types%2freact/19.2.8/19.2.9) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | | [ace-builds](https://github.com/ajaxorg/ace-builds) | dependencies | patch | [`1.43.5` → `1.43.6`](https://renovatebot.com/diffs/npm/ace-builds/1.43.5/1.43.6) | [](https://securityscorecards.dev/viewer/?uri=github.com/ajaxorg/ace-builds) | | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`3.8.0` → `3.8.1`](https://renovatebot.com/diffs/npm/prettier/3.8.0/3.8.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/prettier/prettier) | | [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/typescript-eslint/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | --- ### Release Notes <details> <summary>testing-library/react-testing-library (@​testing-library/react)</summary> ### [`v16.3.2`](https://github.com/testing-library/react-testing-library/releases/tag/v16.3.2) [Compare Source](testing-library/react-testing-library@v16.3.1...v16.3.2) ##### Bug Fixes - Update 'onCaughtError' type inference in 'RenderOptions' to work with React v19 ([#​1438](testing-library/react-testing-library#1438)) ([f32bd1b](testing-library/react-testing-library@f32bd1b)) </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) ##### 🩹 Fixes - **utils:** make RuleCreator root defaultOptions optional ([#​11956](typescript-eslint/typescript-eslint#11956)) - **eslint-plugin:** \[consistent-indexed-object-style] skip fixer if interface is a default export ([#​11951](typescript-eslint/typescript-eslint#11951)) ##### ❤️ Thank You - Cameron - Yukihiro Hasegawa [@​y-hsgw](https://github.com/y-hsgw) You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>ajaxorg/ace-builds (ace-builds)</summary> ### [`v1.43.6`](https://github.com/ajaxorg/ace-builds/blob/HEAD/CHANGELOG.md#1436-2026-01-23) [Compare Source](ajaxorg/ace-builds@v1.43.5...v1.43.6) </details> <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.8.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#381) [Compare Source](prettier/prettier@3.8.0...3.8.1) [diff](prettier/prettier@3.8.0...3.8.1) ##### Include available `printers` in plugin type declarations ([#​18706](prettier/prettier#18706) by [@​porada](https://github.com/porada)) <!-- prettier-ignore --> ```ts // Input import * as prettierPluginEstree from "prettier/plugins/estree"; // Prettier 3.8.0 // Property 'printers' does not exist on type 'typeof import("prettier/plugins/estree")'. ts(2339) prettierPluginEstree.printers.estree; //=> any // Prettier 3.8.1 prettierPluginEstree.printers.estree; //=> Printer prettierPluginEstree.printers["estree-json"]; //=> Printer ``` </details> <details> <summary>typescript-eslint/typescript-eslint (typescript-eslint)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-eslint/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGUiXX0=--> See merge request swiss-armed-forces/cyber-command/cea/loom!262 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com>
chore(deps): update frontend dependencies (patch) (patch) This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [@testing-library/react](https://github.com/testing-library/react-testing-library) | devDependencies | patch | [`16.3.1` → `16.3.2`](https://renovatebot.com/diffs/npm/@testing-library%2freact/16.3.1/16.3.2) | [](https://securityscorecards.dev/viewer/?uri=github.com/testing-library/react-testing-library) | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | devDependencies | patch | [`19.2.8` → `19.2.9`](https://renovatebot.com/diffs/npm/@types%2freact/19.2.8/19.2.9) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | | [ace-builds](https://github.com/ajaxorg/ace-builds) | dependencies | patch | [`1.43.5` → `1.43.6`](https://renovatebot.com/diffs/npm/ace-builds/1.43.5/1.43.6) | [](https://securityscorecards.dev/viewer/?uri=github.com/ajaxorg/ace-builds) | | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`3.8.0` → `3.8.1`](https://renovatebot.com/diffs/npm/prettier/3.8.0/3.8.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/prettier/prettier) | | [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)) | devDependencies | patch | [`8.53.0` → `8.53.1`](https://renovatebot.com/diffs/npm/typescript-eslint/8.53.0/8.53.1) | [](https://securityscorecards.dev/viewer/?uri=github.com/typescript-eslint/typescript-eslint) | --- ### Release Notes <details> <summary>testing-library/react-testing-library (@​testing-library/react)</summary> ### [`v16.3.2`](https://github.com/testing-library/react-testing-library/releases/tag/v16.3.2) [Compare Source](testing-library/react-testing-library@v16.3.1...v16.3.2) ##### Bug Fixes - Update 'onCaughtError' type inference in 'RenderOptions' to work with React v19 ([#​1438](testing-library/react-testing-library#1438)) ([f32bd1b](testing-library/react-testing-library@f32bd1b)) </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) ##### 🩹 Fixes - **utils:** make RuleCreator root defaultOptions optional ([#​11956](typescript-eslint/typescript-eslint#11956)) - **eslint-plugin:** \[consistent-indexed-object-style] skip fixer if interface is a default export ([#​11951](typescript-eslint/typescript-eslint#11951)) ##### ❤️ Thank You - Cameron - Yukihiro Hasegawa [@​y-hsgw](https://github.com/y-hsgw) You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> <details> <summary>ajaxorg/ace-builds (ace-builds)</summary> ### [`v1.43.6`](https://github.com/ajaxorg/ace-builds/blob/HEAD/CHANGELOG.md#1436-2026-01-23) [Compare Source](ajaxorg/ace-builds@v1.43.5...v1.43.6) </details> <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.8.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#381) [Compare Source](prettier/prettier@3.8.0...3.8.1) [diff](prettier/prettier@3.8.0...3.8.1) ##### Include available `printers` in plugin type declarations ([#​18706](prettier/prettier#18706) by [@​porada](https://github.com/porada)) <!-- prettier-ignore --> ```ts // Input import * as prettierPluginEstree from "prettier/plugins/estree"; // Prettier 3.8.0 // Property 'printers' does not exist on type 'typeof import("prettier/plugins/estree")'. ts(2339) prettierPluginEstree.printers.estree; //=> any // Prettier 3.8.1 prettierPluginEstree.printers.estree; //=> Printer prettierPluginEstree.printers["estree-json"]; //=> Printer ``` </details> <details> <summary>typescript-eslint/typescript-eslint (typescript-eslint)</summary> ### [`v8.53.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-eslint/CHANGELOG.md#8531-2026-01-19) [Compare Source](typescript-eslint/typescript-eslint@v8.53.0...v8.53.1) This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website. </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGUiXX0=--> See merge request swiss-armed-forces/cyber-command/cea/loom!262 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com> Co-authored-by: open-source Pipeline <group_90701827_bot_ed04ae348bc5f40af9966fb8b6867e99@noreply.gitlab.com>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.