@types/react 19.2.2 → 19.2.8
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/README.md +1 -1
- react/experimental.d.ts +8 -5
- react/index.d.ts +28 -2
- react/package.json +3 -3
- react/ts5.0/experimental.d.ts +8 -5
- react/ts5.0/index.d.ts +25 -2
react/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for react (https://react.dev/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 10 Jan 2026 09:35:12 GMT
|
|
12
12
|
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
|
13
13
|
|
|
14
14
|
# Credits
|
react/experimental.d.ts
CHANGED
|
@@ -43,12 +43,13 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
|
43
43
|
|
|
44
44
|
declare module "." {
|
|
45
45
|
export interface SuspenseProps {
|
|
46
|
+
// @enableCPUSuspense
|
|
46
47
|
/**
|
|
47
48
|
* The presence of this prop indicates that the content is computationally expensive to render.
|
|
48
49
|
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
|
49
50
|
* @see {@link https://github.com/facebook/react/pull/19936}
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
defer?: boolean | undefined;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
|
@@ -68,17 +69,19 @@ declare module "." {
|
|
|
68
69
|
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
|
69
70
|
/**
|
|
70
71
|
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
72
|
+
* @default "forwards"
|
|
71
73
|
*/
|
|
72
|
-
revealOrder
|
|
74
|
+
revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined;
|
|
73
75
|
/**
|
|
74
76
|
* Dictates how unloaded items in a SuspenseList is shown.
|
|
75
77
|
*
|
|
76
|
-
* - By default, `SuspenseList` will show all fallbacks in the list.
|
|
77
78
|
* - `collapsed` shows only the next fallback in the list.
|
|
78
79
|
* - `hidden` doesn't show any unloaded items.
|
|
79
80
|
* - `visible` shows all fallbacks in the list.
|
|
81
|
+
*
|
|
82
|
+
* @default "hidden"
|
|
80
83
|
*/
|
|
81
|
-
tail
|
|
84
|
+
tail?: SuspenseListTailMode | undefined;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
@@ -86,7 +89,7 @@ declare module "." {
|
|
|
86
89
|
/**
|
|
87
90
|
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
88
91
|
*/
|
|
89
|
-
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]
|
|
92
|
+
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]>;
|
|
90
93
|
/**
|
|
91
94
|
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
|
92
95
|
*/
|
react/index.d.ts
CHANGED
|
@@ -1926,7 +1926,31 @@ declare namespace React {
|
|
|
1926
1926
|
reducer: (state: State, action: Action) => State,
|
|
1927
1927
|
): [State, (action: Action) => void];
|
|
1928
1928
|
|
|
1929
|
-
|
|
1929
|
+
interface UntrackedReactPromise<T> extends PromiseLike<T> {
|
|
1930
|
+
status?: void;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
export interface PendingReactPromise<T> extends PromiseLike<T> {
|
|
1934
|
+
status: "pending";
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
export interface FulfilledReactPromise<T> extends PromiseLike<T> {
|
|
1938
|
+
status: "fulfilled";
|
|
1939
|
+
value: T;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
export interface RejectedReactPromise<T> extends PromiseLike<T> {
|
|
1943
|
+
status: "rejected";
|
|
1944
|
+
reason: unknown;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
export type ReactPromise<T> =
|
|
1948
|
+
| UntrackedReactPromise<T>
|
|
1949
|
+
| PendingReactPromise<T>
|
|
1950
|
+
| FulfilledReactPromise<T>
|
|
1951
|
+
| RejectedReactPromise<T>;
|
|
1952
|
+
|
|
1953
|
+
export type Usable<T> = ReactPromise<T> | Context<T>;
|
|
1930
1954
|
|
|
1931
1955
|
export function use<T>(usable: Usable<T>): T;
|
|
1932
1956
|
|
|
@@ -3540,6 +3564,9 @@ declare namespace React {
|
|
|
3540
3564
|
method?: string | undefined;
|
|
3541
3565
|
min?: number | string | undefined;
|
|
3542
3566
|
name?: string | undefined;
|
|
3567
|
+
nonce?: string | undefined;
|
|
3568
|
+
part?: string | undefined;
|
|
3569
|
+
slot?: string | undefined;
|
|
3543
3570
|
style?: CSSProperties | undefined;
|
|
3544
3571
|
target?: string | undefined;
|
|
3545
3572
|
type?: string | undefined;
|
|
@@ -4057,7 +4084,6 @@ declare namespace React {
|
|
|
4057
4084
|
* Captures which component contained the exception, and its ancestors.
|
|
4058
4085
|
*/
|
|
4059
4086
|
componentStack?: string | null;
|
|
4060
|
-
digest?: string | null;
|
|
4061
4087
|
}
|
|
4062
4088
|
|
|
4063
4089
|
// Keep in sync with JSX namespace in ./jsx-runtime.d.ts and ./jsx-dev-runtime.d.ts
|
react/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.8",
|
|
4
4
|
"description": "TypeScript definitions for react",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
|
6
6
|
"license": "MIT",
|
|
@@ -202,9 +202,9 @@
|
|
|
202
202
|
},
|
|
203
203
|
"scripts": {},
|
|
204
204
|
"dependencies": {
|
|
205
|
-
"csstype": "^3.
|
|
205
|
+
"csstype": "^3.2.2"
|
|
206
206
|
},
|
|
207
207
|
"peerDependencies": {},
|
|
208
|
-
"typesPublisherContentHash": "
|
|
208
|
+
"typesPublisherContentHash": "c9838d545f1709345a21b6b6fc58e0d5fde2af0c005deed9b55bcb60b2373b33",
|
|
209
209
|
"typeScriptVersion": "5.2"
|
|
210
210
|
}
|
react/ts5.0/experimental.d.ts
CHANGED
|
@@ -43,12 +43,13 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
|
43
43
|
|
|
44
44
|
declare module "." {
|
|
45
45
|
export interface SuspenseProps {
|
|
46
|
+
// @enableCPUSuspense
|
|
46
47
|
/**
|
|
47
48
|
* The presence of this prop indicates that the content is computationally expensive to render.
|
|
48
49
|
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
|
49
50
|
* @see {@link https://github.com/facebook/react/pull/19936}
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
defer?: boolean | undefined;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
|
@@ -68,17 +69,19 @@ declare module "." {
|
|
|
68
69
|
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
|
69
70
|
/**
|
|
70
71
|
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
72
|
+
* @default "forwards"
|
|
71
73
|
*/
|
|
72
|
-
revealOrder
|
|
74
|
+
revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined;
|
|
73
75
|
/**
|
|
74
76
|
* Dictates how unloaded items in a SuspenseList is shown.
|
|
75
77
|
*
|
|
76
|
-
* - By default, `SuspenseList` will show all fallbacks in the list.
|
|
77
78
|
* - `collapsed` shows only the next fallback in the list.
|
|
78
79
|
* - `hidden` doesn't show any unloaded items.
|
|
79
80
|
* - `visible` shows all fallbacks in the list.
|
|
81
|
+
*
|
|
82
|
+
* @default "hidden"
|
|
80
83
|
*/
|
|
81
|
-
tail
|
|
84
|
+
tail?: SuspenseListTailMode | undefined;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
@@ -86,7 +89,7 @@ declare module "." {
|
|
|
86
89
|
/**
|
|
87
90
|
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
88
91
|
*/
|
|
89
|
-
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]
|
|
92
|
+
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]>;
|
|
90
93
|
/**
|
|
91
94
|
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
|
92
95
|
*/
|
react/ts5.0/index.d.ts
CHANGED
|
@@ -1925,7 +1925,31 @@ declare namespace React {
|
|
|
1925
1925
|
reducer: (state: State, action: Action) => State,
|
|
1926
1926
|
): [State, (action: Action) => void];
|
|
1927
1927
|
|
|
1928
|
-
|
|
1928
|
+
interface UntrackedReactPromise<T> extends PromiseLike<T> {
|
|
1929
|
+
status?: void;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
export interface PendingReactPromise<T> extends PromiseLike<T> {
|
|
1933
|
+
status: "pending";
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
export interface FulfilledReactPromise<T> extends PromiseLike<T> {
|
|
1937
|
+
status: "fulfilled";
|
|
1938
|
+
value: T;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
export interface RejectedReactPromise<T> extends PromiseLike<T> {
|
|
1942
|
+
status: "rejected";
|
|
1943
|
+
reason: unknown;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
export type ReactPromise<T> =
|
|
1947
|
+
| UntrackedReactPromise<T>
|
|
1948
|
+
| PendingReactPromise<T>
|
|
1949
|
+
| FulfilledReactPromise<T>
|
|
1950
|
+
| RejectedReactPromise<T>;
|
|
1951
|
+
|
|
1952
|
+
export type Usable<T> = ReactPromise<T> | Context<T>;
|
|
1929
1953
|
|
|
1930
1954
|
export function use<T>(usable: Usable<T>): T;
|
|
1931
1955
|
|
|
@@ -4056,7 +4080,6 @@ declare namespace React {
|
|
|
4056
4080
|
* Captures which component contained the exception, and its ancestors.
|
|
4057
4081
|
*/
|
|
4058
4082
|
componentStack?: string | null;
|
|
4059
|
-
digest?: string | null;
|
|
4060
4083
|
}
|
|
4061
4084
|
|
|
4062
4085
|
// Keep in sync with JSX namespace in ./jsx-runtime.d.ts and ./jsx-dev-runtime.d.ts
|