@types/react-dom 19.0.0 → 19.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
react-dom/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for react-dom (https://reactjs.org).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 05 Dec 2024 19:32:25 GMT
11
+ * Last updated: Fri, 06 Dec 2024 13:37:42 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
 
14
14
  # Credits
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "19.0.0",
3
+ "version": "19.0.1",
4
4
  "description": "TypeScript definitions for react-dom",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
6
6
  "license": "MIT",
@@ -61,6 +61,11 @@
61
61
  "default": "./server.d.ts"
62
62
  }
63
63
  },
64
+ "./static": {
65
+ "types": {
66
+ "default": "./static.d.ts"
67
+ }
68
+ },
64
69
  "./experimental": {
65
70
  "types": {
66
71
  "default": "./experimental.d.ts"
@@ -83,6 +88,6 @@
83
88
  "@types/react": "*"
84
89
  },
85
90
  "peerDependencies": {},
86
- "typesPublisherContentHash": "bfa192efe4d902904df093f5cf45f5bfb86784036b0a929810713bb9fbd1c78c",
91
+ "typesPublisherContentHash": "9e9bffd616f69b7613dd9bf32022ffb03434def57e02740090a6baf1e12f0a1a",
87
92
  "typeScriptVersion": "5.0"
88
93
  }
react-dom/static.d.ts ADDED
@@ -0,0 +1,72 @@
1
+ // forward declarations
2
+ declare global {
3
+ namespace NodeJS {
4
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
5
+ interface ReadableStream {}
6
+ }
7
+
8
+ /**
9
+ * Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
12
+ interface AbortSignal {}
13
+
14
+ /**
15
+ * Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
16
+ */
17
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
18
+ interface ReadableStream<R = any> {}
19
+
20
+ /**
21
+ * Stub for https://developer.mozilla.org/en-US/docs/Web/API/Uint8Array
22
+ */
23
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
24
+ interface Uint8Array {}
25
+ }
26
+
27
+ import { ReactNode } from "react";
28
+ import { ErrorInfo } from "./client";
29
+
30
+ export interface PrerenderOptions {
31
+ bootstrapScriptContent?: string;
32
+ bootstrapScripts?: string[];
33
+ bootstrapModules?: string[];
34
+ identifierPrefix?: string;
35
+ namespaceURI?: string;
36
+ onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
37
+ progressiveChunkSize?: number;
38
+ signal?: AbortSignal;
39
+ }
40
+
41
+ export interface PrerenderResult {
42
+ prelude: ReadableStream<Uint8Array>;
43
+ }
44
+
45
+ /**
46
+ * Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
47
+ *
48
+ * @see [API](https://react.dev/reference/react-dom/static/prerender)
49
+ */
50
+ export function prerender(
51
+ reactNode: ReactNode,
52
+ options?: PrerenderOptions,
53
+ ): Promise<PrerenderResult>;
54
+
55
+ export interface PrerenderToNodeStreamResult {
56
+ prelude: NodeJS.ReadableStream;
57
+ }
58
+
59
+ /**
60
+ * Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
61
+ *
62
+ * @see [API](https://react.dev/reference/react-dom/static/prerenderToNodeStream)
63
+ *
64
+ * @param children
65
+ * @param options
66
+ */
67
+ export function prerenderToNodeStream(
68
+ reactNode: ReactNode,
69
+ options?: PrerenderOptions,
70
+ ): Promise<PrerenderToNodeStreamResult>;
71
+
72
+ export const version: string;