@types/react 18.0.18 → 18.0.19
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 +27 -0
- react/package.json +3 -3
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (http://facebook.github.io/reac
|
|
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 Sep 2022 11:02:42 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
|
13
13
|
* Global values: `React`
|
14
14
|
|
react/experimental.d.ts
CHANGED
@@ -102,4 +102,31 @@ declare module '.' {
|
|
102
102
|
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
103
103
|
*/
|
104
104
|
export const SuspenseList: ExoticComponent<SuspenseListProps>;
|
105
|
+
|
106
|
+
interface ThenableImpl<T> {
|
107
|
+
then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
|
108
|
+
}
|
109
|
+
interface UntrackedThenable<T> extends ThenableImpl<T> {
|
110
|
+
status?: void;
|
111
|
+
}
|
112
|
+
|
113
|
+
export interface PendingThenable<T> extends ThenableImpl<T> {
|
114
|
+
status: 'pending';
|
115
|
+
}
|
116
|
+
|
117
|
+
export interface FulfilledThenable<T> extends ThenableImpl<T> {
|
118
|
+
status: 'fulfilled';
|
119
|
+
value: T;
|
120
|
+
}
|
121
|
+
|
122
|
+
export interface RejectedThenable<T> extends ThenableImpl<T> {
|
123
|
+
status: 'rejected';
|
124
|
+
reason: unknown;
|
125
|
+
}
|
126
|
+
|
127
|
+
export type Thenable<T> = UntrackedThenable<T> | PendingThenable<T> | FulfilledThenable<T> | RejectedThenable<T>;
|
128
|
+
|
129
|
+
export type Usable<T> = Thenable<T> | Context<T>;
|
130
|
+
|
131
|
+
export function experimental_use<T>(usable: Usable<T>): T;
|
105
132
|
}
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.0.
|
3
|
+
"version": "18.0.19",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,8 +146,8 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
150
|
-
"typeScriptVersion": "4.
|
149
|
+
"typesPublisherContentHash": "3d4f6d867283506cf1d13819e79f2d366a6ab4067df8d46a481eea6d9b89a6d0",
|
150
|
+
"typeScriptVersion": "4.1",
|
151
151
|
"exports": {
|
152
152
|
".": {
|
153
153
|
"types": {
|