@types/react 16.9.53 → 16.9.54
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 +18 -17
- react/package.json +2 -2
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: Tue, 27 Oct 2020 19:31:41 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types)
|
13
13
|
* Global values: `React`
|
14
14
|
|
react/experimental.d.ts
CHANGED
@@ -39,6 +39,15 @@ import React = require('.');
|
|
39
39
|
export {};
|
40
40
|
|
41
41
|
declare module '.' {
|
42
|
+
export interface SuspenseProps {
|
43
|
+
/**
|
44
|
+
* The presence of this prop indicates that the content is computationally expensive to render.
|
45
|
+
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
46
|
+
* @see {@link https://github.com/facebook/react/pull/19936}
|
47
|
+
*/
|
48
|
+
unstable_expectedLoadTime?: number;
|
49
|
+
}
|
50
|
+
|
42
51
|
export type SuspenseListRevealOrder = 'forwards' | 'backwards' | 'together';
|
43
52
|
export type SuspenseListTailMode = 'collapsed' | 'hidden';
|
44
53
|
|
@@ -94,7 +103,7 @@ declare module '.' {
|
|
94
103
|
*/
|
95
104
|
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
96
105
|
|
97
|
-
export interface SuspenseConfig
|
106
|
+
export interface SuspenseConfig {
|
98
107
|
busyDelayMs?: number;
|
99
108
|
busyMinDurationMs?: number;
|
100
109
|
}
|
@@ -105,17 +114,6 @@ declare module '.' {
|
|
105
114
|
config: SuspenseConfig | null | undefined,
|
106
115
|
): void;
|
107
116
|
|
108
|
-
export interface TimeoutConfig {
|
109
|
-
/**
|
110
|
-
* This timeout (in milliseconds) tells React how long to wait before showing the next state.
|
111
|
-
*
|
112
|
-
* React will always try to use a shorter lag when network and device allows it.
|
113
|
-
*
|
114
|
-
* **NOTE: We recommend that you share Suspense Config between different modules.**
|
115
|
-
*/
|
116
|
-
timeoutMs: number;
|
117
|
-
}
|
118
|
-
|
119
117
|
// must be synchronous
|
120
118
|
export type TransitionFunction = () => void | undefined;
|
121
119
|
// strange definition to allow vscode to show documentation on the invocation
|
@@ -139,11 +137,10 @@ declare module '.' {
|
|
139
137
|
* A good example of this is a text input.
|
140
138
|
*
|
141
139
|
* @param value The value that is going to be deferred
|
142
|
-
* @param config An optional object with `timeoutMs`
|
143
140
|
*
|
144
141
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usedeferredvalue
|
145
142
|
*/
|
146
|
-
export function unstable_useDeferredValue<T>(value: T
|
143
|
+
export function unstable_useDeferredValue<T>(value: T): T;
|
147
144
|
|
148
145
|
/**
|
149
146
|
* Allows components to avoid undesirable loading states by waiting for content to load
|
@@ -164,9 +161,6 @@ declare module '.' {
|
|
164
161
|
*/
|
165
162
|
export function unstable_useTransition(config?: SuspenseConfig | null): [TransitionStartFunction, boolean];
|
166
163
|
|
167
|
-
/**
|
168
|
-
* @private
|
169
|
-
*/
|
170
164
|
const opaqueIdentifierBranding: unique symbol;
|
171
165
|
/**
|
172
166
|
* WARNING: Don't use this as a `string`.
|
@@ -185,4 +179,11 @@ declare module '.' {
|
|
185
179
|
};
|
186
180
|
|
187
181
|
export function unstable_useOpaqueIdentifier(): OpaqueIdentifier;
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Similar to `useTransition` but allows uses where hooks are not available.
|
185
|
+
*
|
186
|
+
* @param callback A _synchronous_ function which causes state updates that can be deferred.
|
187
|
+
*/
|
188
|
+
export function unstable_startTransition(scope: TransitionFunction): void;
|
188
189
|
}
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "16.9.
|
3
|
+
"version": "16.9.54",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -144,6 +144,6 @@
|
|
144
144
|
"@types/prop-types": "*",
|
145
145
|
"csstype": "^3.0.2"
|
146
146
|
},
|
147
|
-
"typesPublisherContentHash": "
|
147
|
+
"typesPublisherContentHash": "539f43006bbb332cbd1304887fab869e607905879da4a2b656a16e7325c91de8",
|
148
148
|
"typeScriptVersion": "3.2"
|
149
149
|
}
|