@types/react 17.0.0 → 17.0.4
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 +5 -13
- react/global.d.ts +0 -0
- react/index.d.ts +6 -11
- 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: Mon, 26 Apr 2021 10:31:22 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
@@ -38,6 +38,9 @@ import React = require('.');
|
|
38
38
|
|
39
39
|
export {};
|
40
40
|
|
41
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
42
|
+
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
43
|
+
|
41
44
|
declare module '.' {
|
42
45
|
export interface SuspenseProps {
|
43
46
|
/**
|
@@ -103,19 +106,8 @@ declare module '.' {
|
|
103
106
|
*/
|
104
107
|
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
105
108
|
|
106
|
-
export interface SuspenseConfig {
|
107
|
-
busyDelayMs?: number;
|
108
|
-
busyMinDurationMs?: number;
|
109
|
-
}
|
110
|
-
|
111
|
-
// undocumented, considered for removal
|
112
|
-
export function unstable_withSuspenseConfig(
|
113
|
-
scope: () => void | undefined,
|
114
|
-
config: SuspenseConfig | null | undefined,
|
115
|
-
): void;
|
116
|
-
|
117
109
|
// must be synchronous
|
118
|
-
export type TransitionFunction = () =>
|
110
|
+
export type TransitionFunction = () => VoidOrUndefinedOnly;
|
119
111
|
// strange definition to allow vscode to show documentation on the invocation
|
120
112
|
export interface TransitionStartFunction {
|
121
113
|
/**
|
@@ -159,7 +151,7 @@ declare module '.' {
|
|
159
151
|
*
|
160
152
|
* @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition
|
161
153
|
*/
|
162
|
-
export function unstable_useTransition(
|
154
|
+
export function unstable_useTransition(): [TransitionStartFunction, boolean];
|
163
155
|
|
164
156
|
const opaqueIdentifierBranding: unique symbol;
|
165
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,14 +53,9 @@ type NativeUIEvent = UIEvent;
|
|
52
53
|
type NativeWheelEvent = WheelEvent;
|
53
54
|
type Booleanish = boolean | 'true' | 'false';
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
interface SchedulerInteraction {
|
59
|
-
id: number;
|
60
|
-
name: string;
|
61
|
-
timestamp: number;
|
62
|
-
}
|
56
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
57
|
+
// Destructors are only allowed to return void.
|
58
|
+
type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never };
|
63
59
|
|
64
60
|
// tslint:disable-next-line:export-just-namespace
|
65
61
|
export = React;
|
@@ -82,7 +78,7 @@ declare namespace React {
|
|
82
78
|
type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
|
83
79
|
|
84
80
|
type JSXElementConstructor<P> =
|
85
|
-
| ((props: P) => ReactElement | null)
|
81
|
+
| ((props: P) => ReactElement<any, any> | null)
|
86
82
|
| (new (props: P) => Component<P, any>);
|
87
83
|
|
88
84
|
interface RefObject<T> {
|
@@ -891,8 +887,7 @@ declare namespace React {
|
|
891
887
|
type DependencyList = ReadonlyArray<any>;
|
892
888
|
|
893
889
|
// NOTE: callbacks are _only_ allowed to return either void, or a destructor.
|
894
|
-
|
895
|
-
type EffectCallback = () => (void | (() => void | undefined));
|
890
|
+
type EffectCallback = () => (void | Destructor);
|
896
891
|
|
897
892
|
interface MutableRefObject<T> {
|
898
893
|
current: T;
|
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.4",
|
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": "c6cadabf6c6ad2fa532093c97e563398385fdfec0709120cc42b6652cbcc7908",
|
149
|
+
"typeScriptVersion": "3.5"
|
149
150
|
}
|