@types/react 18.2.76 → 18.2.77
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/canary.d.ts +24 -0
- react/experimental.d.ts +0 -18
- react/package.json +2 -2
- react/ts5.0/canary.d.ts +24 -0
- react/ts5.0/experimental.d.ts +0 -18
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
|
11
|
+
* Last updated: Thu, 11 Apr 2024 21:35:20 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,23 @@ 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
|
+
}
|
144
168
|
}
|
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.
|
3
|
+
"version": "18.2.77",
|
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": "
|
208
|
+
"typesPublisherContentHash": "2773ff59b2dd54e1c4b4a9ab41c84eeb90f5e19a520b41273cb1ac6538b0e49c",
|
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,23 @@ 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
|
+
}
|
144
168
|
}
|
react/ts5.0/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.
|