@types/react-dom
Advanced tools
@@ -35,71 +35,1 @@ /* eslint-disable @definitelytyped/no-self-import -- self-imports in module augmentations aren't self-imports */ | ||
| export {}; | ||
| declare module "react" { | ||
| // eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
| interface CacheSignal extends AbortSignal {} | ||
| } | ||
| declare const POSTPONED_STATE_SIGIL: unique symbol; | ||
| declare module "react-dom/static" { | ||
| /** | ||
| * This is an opaque type i.e. users should not make any assumptions about its structure. | ||
| * It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}. | ||
| */ | ||
| interface PostponedState { | ||
| [POSTPONED_STATE_SIGIL]: never; | ||
| } | ||
| interface ResumeOptions { | ||
| nonce?: string; | ||
| signal?: AbortSignal; | ||
| onError?: (error: unknown) => string | undefined | void; | ||
| } | ||
| interface PrerenderResult { | ||
| postponed: null | PostponedState; | ||
| } | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| function resumeAndPrerender( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: Omit<ResumeOptions, "nonce">, | ||
| ): Promise<PrerenderResult>; | ||
| interface PrerenderToNodeStreamResult { | ||
| postponed: null | PostponedState; | ||
| } | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| function resumeAndPrerenderToNodeStream( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: Omit<ResumeOptions, "nonce">, | ||
| ): Promise<PrerenderToNodeStreamResult>; | ||
| } | ||
| import { PostponedState, ResumeOptions } from "react-dom/static"; | ||
| declare module "react-dom/server" { | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| function resume( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: ResumeOptions, | ||
| ): Promise<ReactDOMServerReadableStream>; | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| function resumeToPipeableStream( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: ResumeOptions, | ||
| ): Promise<PipeableStream>; | ||
| } |
@@ -9,2 +9,7 @@ // NOTE: Users of the `experimental` builds of React should add a reference | ||
| declare module "react" { | ||
| // eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
| interface CacheSignal extends AbortSignal {} | ||
| } | ||
| export function createPortal( | ||
@@ -11,0 +16,0 @@ children: ReactNode, |
| { | ||
| "name": "@types/react-dom", | ||
| "version": "19.1.11", | ||
| "version": "19.2.0", | ||
| "description": "TypeScript definitions for react-dom", | ||
@@ -124,6 +124,6 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
| "peerDependencies": { | ||
| "@types/react": "^19.0.0" | ||
| "@types/react": "^19.2.0" | ||
| }, | ||
| "typesPublisherContentHash": "df97d62b7c8884b591468a10b2188d6a5a1f7767ccab6c0a7248e2cfdbe534e6", | ||
| "typesPublisherContentHash": "4a296bd89e24edb236357aa2daf5e5f23648fa3270267dfef1e71cafb2822417", | ||
| "typeScriptVersion": "5.2" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Wed, 01 Oct 2025 17:34:27 GMT | ||
| * Last updated: Wed, 01 Oct 2025 22:02:19 GMT | ||
| * Dependencies: none | ||
@@ -14,0 +14,0 @@ * Peer dependencies: [@types/react](https://npmjs.com/package/@types/react) |
@@ -26,2 +26,3 @@ // forward declarations | ||
| import { ErrorInfo, ReactFormState } from "./client"; | ||
| import { PostponedState, ResumeOptions } from "./static"; | ||
@@ -159,4 +160,26 @@ export interface BootstrapScriptDescriptor { | ||
| export { ResumeOptions }; | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| export function resume( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: ResumeOptions, | ||
| ): Promise<ReactDOMServerReadableStream>; | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| export function resumeToPipeableStream( | ||
| children: React.ReactNode, | ||
| postponedState: PostponedState, | ||
| options?: ResumeOptions, | ||
| ): Promise<PipeableStream>; | ||
| export const version: string; | ||
| export as namespace ReactDOMServer; |
@@ -1,1 +0,1 @@ | ||
| export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server"; | ||
| export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server"; |
@@ -1,1 +0,8 @@ | ||
| export { renderToPipeableStream, renderToStaticMarkup, renderToString } from "./server"; | ||
| export { | ||
| renderToPipeableStream, | ||
| renderToReadableStream, | ||
| renderToStaticMarkup, | ||
| renderToString, | ||
| resume, | ||
| resumeToPipeableStream, | ||
| } from "./server"; |
@@ -29,4 +29,15 @@ // forward declarations | ||
| import { ErrorInfo } from "./client"; | ||
| export {}; | ||
| declare const POSTPONED_STATE_SIGIL: unique symbol; | ||
| /** | ||
| * This is an opaque type i.e. users should not make any assumptions about its structure. | ||
| * It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}. | ||
| */ | ||
| export interface PostponedState { | ||
| [POSTPONED_STATE_SIGIL]: never; | ||
| } | ||
| /** | ||
| * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps} | ||
@@ -76,3 +87,3 @@ */ | ||
| identifierPrefix?: string; | ||
| importMap?: ImportMap | undefined; | ||
| importMap?: ReactImportMap | undefined; | ||
| namespaceURI?: string; | ||
@@ -86,2 +97,3 @@ onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; | ||
| export interface PrerenderResult { | ||
| postponed: null | PostponedState; | ||
| prelude: ReadableStream<Uint8Array>; | ||
@@ -102,2 +114,3 @@ } | ||
| prelude: NodeJS.ReadableStream; | ||
| postponed: null | PostponedState; | ||
| } | ||
@@ -118,2 +131,28 @@ | ||
| export interface ResumeOptions { | ||
| nonce?: string; | ||
| signal?: AbortSignal; | ||
| onError?: (error: unknown) => string | undefined | void; | ||
| } | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| export function resumeAndPrerender( | ||
| children: React.ReactNode, | ||
| postponedState: null | PostponedState, | ||
| options?: Omit<ResumeOptions, "nonce">, | ||
| ): Promise<PrerenderResult>; | ||
| /** | ||
| * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation} | ||
| * @version 19.2 | ||
| */ | ||
| export function resumeAndPrerenderToNodeStream( | ||
| children: React.ReactNode, | ||
| postponedState: null | PostponedState, | ||
| options?: Omit<ResumeOptions, "nonce">, | ||
| ): Promise<PrerenderToNodeStreamResult>; | ||
| export const version: string; |
@@ -1,1 +0,1 @@ | ||
| export { prerender, version } from "./static"; | ||
| export { prerender, resumeAndPrerender, version } from "./static"; |
@@ -1,1 +0,7 @@ | ||
| export { prerenderToNodeStream, version } from "./static"; | ||
| export { | ||
| prerender, | ||
| prerenderToNodeStream, | ||
| resumeAndPrerender, | ||
| resumeAndPrerenderToNodeStream, | ||
| version, | ||
| } from "./static"; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
640
1.11%29980
-0.26%