We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fc6a75 commit e64d1b8Copy full SHA for e64d1b8
types/index.d.ts
@@ -127,7 +127,7 @@ export interface RenderOptions<
127
* @see {@link https://react.dev/reference/react-dom/client/createRoot#parameters createRoot#options}
128
*/
129
onCaughtError?: ReactDOMClient.RootOptions extends {
130
- onCaughtError: infer OnCaughtError
+ onCaughtError?: infer OnCaughtError
131
}
132
? OnCaughtError
133
: never
types/test.tsx
@@ -268,7 +268,7 @@ export function testErrorHandlers() {
268
render(null, {
269
// Should work with React 19 types
270
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
271
- // @ts-expect-error
+ // @ts-ignore
272
onCaughtError: () => {},
273
})
274
0 commit comments