@types/react 17.0.1 → 17.0.2
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 +5 -2
- react/index.d.ts +5 -2
- 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: Fri, 12 Feb 2021 18:02:47 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
@@ -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
|
/**
|
@@ -110,12 +113,12 @@ declare module '.' {
|
|
110
113
|
|
111
114
|
// undocumented, considered for removal
|
112
115
|
export function unstable_withSuspenseConfig(
|
113
|
-
scope: () =>
|
116
|
+
scope: () => VoidOrUndefinedOnly,
|
114
117
|
config: SuspenseConfig | null | undefined,
|
115
118
|
): void;
|
116
119
|
|
117
120
|
// must be synchronous
|
118
|
-
export type TransitionFunction = () =>
|
121
|
+
export type TransitionFunction = () => VoidOrUndefinedOnly;
|
119
122
|
// strange definition to allow vscode to show documentation on the invocation
|
120
123
|
export interface TransitionStartFunction {
|
121
124
|
/**
|
react/index.d.ts
CHANGED
@@ -61,6 +61,10 @@ interface SchedulerInteraction {
|
|
61
61
|
timestamp: number;
|
62
62
|
}
|
63
63
|
|
64
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
65
|
+
// Destructors are only allowed to return void.
|
66
|
+
type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never };
|
67
|
+
|
64
68
|
// tslint:disable-next-line:export-just-namespace
|
65
69
|
export = React;
|
66
70
|
export as namespace React;
|
@@ -891,8 +895,7 @@ declare namespace React {
|
|
891
895
|
type DependencyList = ReadonlyArray<any>;
|
892
896
|
|
893
897
|
// NOTE: callbacks are _only_ allowed to return either void, or a destructor.
|
894
|
-
|
895
|
-
type EffectCallback = () => (void | (() => void | undefined));
|
898
|
+
type EffectCallback = () => (void | Destructor);
|
896
899
|
|
897
900
|
interface MutableRefObject<T> {
|
898
901
|
current: T;
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.2",
|
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": "b4bc71e5ae8e6467bc315f57f8e7b98e248d5994ecaaf51bd4e674de77bfb6fc",
|
148
148
|
"typeScriptVersion": "3.4"
|
149
149
|
}
|