@types/react 18.2.76 → 18.2.78

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: Thu, 11 Apr 2024 17:35:56 GMT
11
+ * Last updated: Sat, 13 Apr 2024 09:35:16 GMT
12
12
  * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/canary.d.ts CHANGED
@@ -30,6 +30,11 @@ export {};
30
30
  declare const UNDEFINED_VOID_ONLY: unique symbol;
31
31
  type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
32
32
 
33
+ /**
34
+ * @internal
35
+ */
36
+ interface ReactContextAsReactNode extends React.Context<React.ReactNode> {}
37
+
33
38
  declare module "." {
34
39
  interface ThenableImpl<T> {
35
40
  then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
@@ -141,4 +146,24 @@ declare module "." {
141
146
  onTransitionStart?: TransitionEventHandler<T> | undefined;
142
147
  onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
143
148
  }
149
+
150
+ /**
151
+ * @internal Use `Awaited<ReactNode>` instead
152
+ */
153
+ // Helper type to enable `Awaited<ReactNode>`.
154
+ // Must be a copy of the non-thenables of `ReactNode`.
155
+ type AwaitedReactNode =
156
+ | ReactElement
157
+ | string
158
+ | number
159
+ | Iterable<AwaitedReactNode>
160
+ | ReactPortal
161
+ | boolean
162
+ | null
163
+ | undefined;
164
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
165
+ contexts: ReactContextAsReactNode;
166
+ promises: Promise<AwaitedReactNode>;
167
+ bigints: bigint;
168
+ }
144
169
  }
react/experimental.d.ts CHANGED
@@ -42,24 +42,6 @@ declare const UNDEFINED_VOID_ONLY: unique symbol;
42
42
  type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
43
43
 
44
44
  declare module "." {
45
- /**
46
- * @internal Use `Awaited<ReactNode>` instead
47
- */
48
- // Helper type to enable `Awaited<ReactNode>`.
49
- // Must be a copy of the non-thenables of `ReactNode`.
50
- type AwaitedReactNode =
51
- | ReactElement
52
- | string
53
- | number
54
- | Iterable<AwaitedReactNode>
55
- | ReactPortal
56
- | boolean
57
- | null
58
- | undefined;
59
- interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
60
- promises: Promise<AwaitedReactNode>;
61
- }
62
-
63
45
  export interface SuspenseProps {
64
46
  /**
65
47
  * The presence of this prop indicates that the content is computationally expensive to render.
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.2.76",
3
+ "version": "18.2.78",
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
  "@types/prop-types": "*",
206
206
  "csstype": "^3.0.2"
207
207
  },
208
- "typesPublisherContentHash": "8c16114990a8e048e26e229aeea3fc3809477c4cd0c0c10b84db39ded9fd44c6",
208
+ "typesPublisherContentHash": "cc4093ce02db05531a3fd3f9d3849d8fa4dfdb391c13de13f2acf4d440b89c51",
209
209
  "typeScriptVersion": "4.7"
210
210
  }
react/ts5.0/canary.d.ts CHANGED
@@ -30,6 +30,11 @@ export {};
30
30
  declare const UNDEFINED_VOID_ONLY: unique symbol;
31
31
  type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
32
32
 
33
+ /**
34
+ * @internal
35
+ */
36
+ interface ReactContextAsReactNode extends React.Context<React.ReactNode> {}
37
+
33
38
  declare module "." {
34
39
  interface ThenableImpl<T> {
35
40
  then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
@@ -141,4 +146,24 @@ declare module "." {
141
146
  onTransitionStart?: TransitionEventHandler<T> | undefined;
142
147
  onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
143
148
  }
149
+
150
+ /**
151
+ * @internal Use `Awaited<ReactNode>` instead
152
+ */
153
+ // Helper type to enable `Awaited<ReactNode>`.
154
+ // Must be a copy of the non-thenables of `ReactNode`.
155
+ type AwaitedReactNode =
156
+ | ReactElement
157
+ | string
158
+ | number
159
+ | Iterable<AwaitedReactNode>
160
+ | ReactPortal
161
+ | boolean
162
+ | null
163
+ | undefined;
164
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
165
+ contexts: ReactContextAsReactNode;
166
+ promises: Promise<AwaitedReactNode>;
167
+ bigints: bigint;
168
+ }
144
169
  }
@@ -42,24 +42,6 @@ declare const UNDEFINED_VOID_ONLY: unique symbol;
42
42
  type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
43
43
 
44
44
  declare module "." {
45
- /**
46
- * @internal Use `Awaited<ReactNode>` instead
47
- */
48
- // Helper type to enable `Awaited<ReactNode>`.
49
- // Must be a copy of the non-thenables of `ReactNode`.
50
- type AwaitedReactNode =
51
- | ReactElement
52
- | string
53
- | number
54
- | Iterable<AwaitedReactNode>
55
- | ReactPortal
56
- | boolean
57
- | null
58
- | undefined;
59
- interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
60
- promises: Promise<AwaitedReactNode>;
61
- }
62
-
63
45
  export interface SuspenseProps {
64
46
  /**
65
47
  * The presence of this prop indicates that the content is computationally expensive to render.