@types/react-dom
Advanced tools
Comparing version
@@ -13,3 +13,3 @@ /** | ||
identifierPrefix?: string; | ||
onRecoverableError?: (error: unknown) => void; | ||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; | ||
} | ||
@@ -22,5 +22,10 @@ | ||
identifierPrefix?: string; | ||
onRecoverableError?: (error: unknown) => void; | ||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; | ||
} | ||
export interface ErrorInfo { | ||
digest?: string; | ||
componentStack?: string; | ||
} | ||
export interface Root { | ||
@@ -27,0 +32,0 @@ render(children: React.ReactNode): void; |
@@ -31,6 +31,24 @@ /** | ||
import React = require('react'); | ||
import ReactDOM = require('./next'); | ||
import ReactDOM = require('./canary'); | ||
export {}; | ||
declare module '.' {} | ||
declare module '.' { | ||
interface FormStatusNotPending { | ||
pending: false; | ||
data: null; | ||
method: null; | ||
action: null; | ||
} | ||
interface FormStatusPending { | ||
pending: true; | ||
data: FormData; | ||
method: string; | ||
action: string | ((formData: FormData) => void | Promise<void>); | ||
} | ||
type FormStatus = FormStatusPending | FormStatusNotPending; | ||
function experimental_useFormStatus(): FormStatus; | ||
} |
@@ -1,2 +0,2 @@ | ||
// Type definitions for React (react-dom) 18.0 | ||
// Type definitions for React (react-dom) 18.2 | ||
// Project: https://reactjs.org | ||
@@ -37,5 +37,4 @@ // Definitions by: Asana <https://asana.com> | ||
export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void; | ||
export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void; | ||
export function unstable_batchedUpdates(callback: () => any): void; | ||
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R; | ||
export function unstable_batchedUpdates<R>(callback: () => R): R; | ||
@@ -42,0 +41,0 @@ export function unstable_renderSubtreeIntoContainer<T extends Element>( |
{ | ||
"name": "@types/react-dom", | ||
"version": "18.0.10", | ||
"version": "18.2.7", | ||
"description": "TypeScript definitions for React (react-dom)", | ||
@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
}, | ||
"typesPublisherContentHash": "5423ad1f388a78bf72f9d4995aa595d3ca66f1750f4fcb24868ba98d3c06e615", | ||
"typeScriptVersion": "4.2", | ||
"typesPublisherContentHash": "726a49383efba462b3ec2c83e7628b88070ea64986c3f1b2de67241452512b5a", | ||
"typeScriptVersion": "4.3", | ||
"exports": { | ||
@@ -66,5 +66,5 @@ ".": { | ||
}, | ||
"./next": { | ||
"./canary": { | ||
"types": { | ||
"default": "./next.d.ts" | ||
"default": "./canary.d.ts" | ||
} | ||
@@ -71,0 +71,0 @@ }, |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 23 Dec 2022 11:32:40 GMT | ||
* Last updated: Wed, 12 Jul 2023 19:02:46 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: `ReactDOM`, `ReactDOMServer` |
@@ -25,2 +25,3 @@ // forward declarations | ||
import { ReactElement, ReactNode } from 'react'; | ||
import { ErrorInfo } from './client'; | ||
@@ -38,8 +39,8 @@ export interface RenderToPipeableStreamOptions { | ||
onAllReady?: () => void; | ||
onError?: (error: unknown) => void; | ||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; | ||
} | ||
export interface PipeableStream { | ||
abort(): void; | ||
pipe<Writable extends NodeJS.WritableStream>(destination: Writable): Writable; | ||
abort: (reason?: unknown) => void; | ||
pipe: <Writable extends NodeJS.WritableStream>(destination: Writable) => Writable; | ||
} | ||
@@ -102,3 +103,3 @@ | ||
signal?: AbortSignal; | ||
onError?: (error: unknown) => void; | ||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; | ||
} | ||
@@ -105,0 +106,0 @@ |
@@ -85,3 +85,3 @@ import { | ||
*/ | ||
export namespace Simulate { | ||
export namespace Simulate { | ||
const abort: EventSimulator; | ||
@@ -92,2 +92,3 @@ const animationEnd: EventSimulator; | ||
const blur: EventSimulator; | ||
const cancel: EventSimulator; | ||
const canPlay: EventSimulator; | ||
@@ -97,2 +98,3 @@ const canPlayThrough: EventSimulator; | ||
const click: EventSimulator; | ||
const close: EventSimulator; | ||
const compositionEnd: EventSimulator; | ||
@@ -104,2 +106,3 @@ const compositionStart: EventSimulator; | ||
const cut: EventSimulator; | ||
const auxClick: EventSimulator; | ||
const doubleClick: EventSimulator; | ||
@@ -141,7 +144,21 @@ const drag: EventSimulator; | ||
const progress: EventSimulator; | ||
const pointerCancel: EventSimulator; | ||
const pointerDown: EventSimulator; | ||
const pointerUp: EventSimulator; | ||
const pointerMove: EventSimulator; | ||
const pointerOut: EventSimulator; | ||
const pointerOver: EventSimulator; | ||
const pointerEnter: EventSimulator; | ||
const pointerLeave: EventSimulator; | ||
const gotPointerCapture: EventSimulator; | ||
const lostPointerCapture: EventSimulator; | ||
const rateChange: EventSimulator; | ||
const reset: EventSimulator; | ||
const resize: EventSimulator; | ||
const scroll: EventSimulator; | ||
const toggle: EventSimulator; | ||
const seeked: EventSimulator; | ||
const seeking: EventSimulator; | ||
const select: EventSimulator; | ||
const beforeInput: EventSimulator; | ||
const stalled: EventSimulator; | ||
@@ -148,0 +165,0 @@ const submit: EventSimulator; |
30229
4.44%638
6.16%