@types/react 17.0.2 → 17.0.6
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/LICENSE +0 -0
- react/README.md +2 -2
- react/experimental.d.ts +3 -14
- react/global.d.ts +0 -0
- react/index.d.ts +2 -10
- react/jsx-dev-runtime.d.ts +0 -0
- react/jsx-runtime.d.ts +0 -0
- react/package.json +4 -3
react/LICENSE
CHANGED
File without changes
|
react/README.md
CHANGED
@@ -8,8 +8,8 @@ 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:
|
12
|
-
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types)
|
11
|
+
* Last updated: Tue, 18 May 2021 17:02:00 GMT
|
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
|
|
15
15
|
# Credits
|
react/experimental.d.ts
CHANGED
@@ -106,17 +106,6 @@ declare module '.' {
|
|
106
106
|
*/
|
107
107
|
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
108
108
|
|
109
|
-
export interface SuspenseConfig {
|
110
|
-
busyDelayMs?: number;
|
111
|
-
busyMinDurationMs?: number;
|
112
|
-
}
|
113
|
-
|
114
|
-
// undocumented, considered for removal
|
115
|
-
export function unstable_withSuspenseConfig(
|
116
|
-
scope: () => VoidOrUndefinedOnly,
|
117
|
-
config: SuspenseConfig | null | undefined,
|
118
|
-
): void;
|
119
|
-
|
120
109
|
// must be synchronous
|
121
110
|
export type TransitionFunction = () => VoidOrUndefinedOnly;
|
122
111
|
// strange definition to allow vscode to show documentation on the invocation
|
@@ -153,8 +142,8 @@ declare module '.' {
|
|
153
142
|
*
|
154
143
|
* The `useTransition` hook returns two values in an array.
|
155
144
|
*
|
156
|
-
* The first is
|
157
|
-
* The seconda
|
145
|
+
* The first is boolean, React’s way of informing us whether we’re waiting for the transition to finish.
|
146
|
+
* The seconda is a function that takes a callback. We can use it to tell React which state we want to defer.
|
158
147
|
*
|
159
148
|
* **If some state update causes a component to suspend, that state update should be wrapped in a transition.**
|
160
149
|
*
|
@@ -162,7 +151,7 @@ declare module '.' {
|
|
162
151
|
*
|
163
152
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition
|
164
153
|
*/
|
165
|
-
export function unstable_useTransition(
|
154
|
+
export function unstable_useTransition(): [boolean, TransitionStartFunction];
|
166
155
|
|
167
156
|
const opaqueIdentifierBranding: unique symbol;
|
168
157
|
/**
|
react/global.d.ts
CHANGED
File without changes
|
react/index.d.ts
CHANGED
@@ -37,6 +37,7 @@
|
|
37
37
|
|
38
38
|
import * as CSS from 'csstype';
|
39
39
|
import * as PropTypes from 'prop-types';
|
40
|
+
import { Interaction as SchedulerInteraction } from 'scheduler/tracing';
|
40
41
|
|
41
42
|
type NativeAnimationEvent = AnimationEvent;
|
42
43
|
type NativeClipboardEvent = ClipboardEvent;
|
@@ -52,15 +53,6 @@ type NativeUIEvent = UIEvent;
|
|
52
53
|
type NativeWheelEvent = WheelEvent;
|
53
54
|
type Booleanish = boolean | 'true' | 'false';
|
54
55
|
|
55
|
-
/**
|
56
|
-
* defined in scheduler/tracing
|
57
|
-
*/
|
58
|
-
interface SchedulerInteraction {
|
59
|
-
id: number;
|
60
|
-
name: string;
|
61
|
-
timestamp: number;
|
62
|
-
}
|
63
|
-
|
64
56
|
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
65
57
|
// Destructors are only allowed to return void.
|
66
58
|
type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never };
|
@@ -407,7 +399,7 @@ declare namespace React {
|
|
407
399
|
const version: string;
|
408
400
|
|
409
401
|
/**
|
410
|
-
* {@link https://
|
402
|
+
* {@link https://reactjs.org/docs/profiler.html#onrender-callback Profiler API}
|
411
403
|
*/
|
412
404
|
type ProfilerOnRenderCallback = (
|
413
405
|
id: string,
|
react/jsx-dev-runtime.d.ts
CHANGED
File without changes
|
react/jsx-runtime.d.ts
CHANGED
File without changes
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.6",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"license": "MIT",
|
6
6
|
"contributors": [
|
@@ -142,8 +142,9 @@
|
|
142
142
|
"scripts": {},
|
143
143
|
"dependencies": {
|
144
144
|
"@types/prop-types": "*",
|
145
|
+
"@types/scheduler": "*",
|
145
146
|
"csstype": "^3.0.2"
|
146
147
|
},
|
147
|
-
"typesPublisherContentHash": "
|
148
|
-
"typeScriptVersion": "3.
|
148
|
+
"typesPublisherContentHash": "fbd3e59d5003c016f5f04c4dcf2300cd7b3f854091b37d9f12516a0a49203656",
|
149
|
+
"typeScriptVersion": "3.5"
|
149
150
|
}
|