@types/react 19.1.7 → 19.1.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 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: Mon, 09 Jun 2025 20:02:33 GMT
11
+ * Last updated: Wed, 11 Jun 2025 13:41:16 GMT
12
12
  * Dependencies: [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/experimental.d.ts CHANGED
@@ -51,10 +51,13 @@ declare module "." {
51
51
  unstable_expectedLoadTime?: number | undefined;
52
52
  }
53
53
 
54
- export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
55
- export type SuspenseListTailMode = "collapsed" | "hidden";
54
+ export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
55
+ export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
56
56
 
57
57
  export interface SuspenseListCommonProps {
58
+ }
59
+
60
+ interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
58
61
  /**
59
62
  * Note that SuspenseList require more than one child;
60
63
  * it is a runtime warning to provide only a single child.
@@ -62,33 +65,32 @@ declare module "." {
62
65
  * It does, however, allow those children to be wrapped inside a single
63
66
  * level of `<React.Fragment>`.
64
67
  */
65
- children: ReactElement | Iterable<ReactElement>;
66
- }
67
-
68
- interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
68
+ children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
69
69
  /**
70
70
  * Defines the order in which the `SuspenseList` children should be revealed.
71
71
  */
72
- revealOrder: "forwards" | "backwards";
72
+ revealOrder: "forwards" | "backwards" | "unstable_legacy-backwards";
73
73
  /**
74
74
  * Dictates how unloaded items in a SuspenseList is shown.
75
75
  *
76
76
  * - By default, `SuspenseList` will show all fallbacks in the list.
77
77
  * - `collapsed` shows only the next fallback in the list.
78
- * - `hidden` doesnt show any unloaded items.
78
+ * - `hidden` doesn't show any unloaded items.
79
+ * - `visible` shows all fallbacks in the list.
79
80
  */
80
- tail?: SuspenseListTailMode | undefined;
81
+ tail: SuspenseListTailMode;
81
82
  }
82
83
 
83
84
  interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
85
+ children: ReactNode;
84
86
  /**
85
87
  * Defines the order in which the `SuspenseList` children should be revealed.
86
88
  */
87
- revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
89
+ revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
88
90
  /**
89
91
  * The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
90
92
  */
91
- tail?: never | undefined;
93
+ tail?: never;
92
94
  }
93
95
 
94
96
  export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "19.1.7",
3
+ "version": "19.1.8",
4
4
  "description": "TypeScript definitions for react",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -205,6 +205,6 @@
205
205
  "csstype": "^3.0.2"
206
206
  },
207
207
  "peerDependencies": {},
208
- "typesPublisherContentHash": "5ea13c31e4a3bf8c9037908593dd7369d3c55bc17a3fa4cea0005bf0fb8e5790",
208
+ "typesPublisherContentHash": "585a01b49a65d7fbb67c6837bf92323a5aeed126fb67079897cfc5b780c19454",
209
209
  "typeScriptVersion": "5.1"
210
210
  }
@@ -51,10 +51,13 @@ declare module "." {
51
51
  unstable_expectedLoadTime?: number | undefined;
52
52
  }
53
53
 
54
- export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
55
- export type SuspenseListTailMode = "collapsed" | "hidden";
54
+ export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
55
+ export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
56
56
 
57
57
  export interface SuspenseListCommonProps {
58
+ }
59
+
60
+ interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
58
61
  /**
59
62
  * Note that SuspenseList require more than one child;
60
63
  * it is a runtime warning to provide only a single child.
@@ -62,33 +65,32 @@ declare module "." {
62
65
  * It does, however, allow those children to be wrapped inside a single
63
66
  * level of `<React.Fragment>`.
64
67
  */
65
- children: ReactElement | Iterable<ReactElement>;
66
- }
67
-
68
- interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
68
+ children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
69
69
  /**
70
70
  * Defines the order in which the `SuspenseList` children should be revealed.
71
71
  */
72
- revealOrder: "forwards" | "backwards";
72
+ revealOrder: "forwards" | "backwards" | "unstable_legacy-backwards";
73
73
  /**
74
74
  * Dictates how unloaded items in a SuspenseList is shown.
75
75
  *
76
76
  * - By default, `SuspenseList` will show all fallbacks in the list.
77
77
  * - `collapsed` shows only the next fallback in the list.
78
- * - `hidden` doesnt show any unloaded items.
78
+ * - `hidden` doesn't show any unloaded items.
79
+ * - `visible` shows all fallbacks in the list.
79
80
  */
80
- tail?: SuspenseListTailMode | undefined;
81
+ tail: SuspenseListTailMode;
81
82
  }
82
83
 
83
84
  interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
85
+ children: ReactNode;
84
86
  /**
85
87
  * Defines the order in which the `SuspenseList` children should be revealed.
86
88
  */
87
- revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
89
+ revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
88
90
  /**
89
91
  * The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
90
92
  */
91
- tail?: never | undefined;
93
+ tail?: never;
92
94
  }
93
95
 
94
96
  export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;