@types/react-dom 19.0.0 → 19.0.2
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 +4 -2
- react-dom/package.json +10 -5
- react-dom/static.d.ts +72 -0
react-dom/README.md
CHANGED
@@ -8,8 +8,10 @@ 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:
|
12
|
-
* Dependencies:
|
11
|
+
* Last updated: Mon, 09 Dec 2024 19:32:14 GMT
|
12
|
+
* Dependencies: none
|
13
|
+
|
14
|
+
* Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
13
15
|
|
14
16
|
# Credits
|
15
17
|
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
|
react-dom/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react-dom",
|
3
|
-
"version": "19.0.
|
3
|
+
"version": "19.0.2",
|
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"
|
@@ -79,10 +84,10 @@
|
|
79
84
|
"directory": "types/react-dom"
|
80
85
|
},
|
81
86
|
"scripts": {},
|
82
|
-
"dependencies": {
|
83
|
-
|
87
|
+
"dependencies": {},
|
88
|
+
"peerDependencies": {
|
89
|
+
"@types/react": "^19.0.0"
|
84
90
|
},
|
85
|
-
"
|
86
|
-
"typesPublisherContentHash": "bfa192efe4d902904df093f5cf45f5bfb86784036b0a929810713bb9fbd1c78c",
|
91
|
+
"typesPublisherContentHash": "b4faecddd46186ac22c8529000bb42364b5707a973909a88c1ec71ebc64488d7",
|
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;
|