@types/react 16.14.2 → 16.14.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 v16.14/LICENSE CHANGED
File without changes
react v16.14/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 23 Nov 2020 18:56:37 GMT
12
- * Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types)
11
+ * Last updated: Tue, 04 May 2021 21:01:30 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 v16.14/global.d.ts CHANGED
File without changes
react v16.14/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
- * defined in scheduler/tracing
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> {
@@ -405,7 +401,7 @@ declare namespace React {
405
401
  const version: string;
406
402
 
407
403
  /**
408
- * {@link https://github.com/bvaughn/rfcs/blob/profiler/text/0000-profiler.md#detailed-design | API}
404
+ * {@link https://reactjs.org/docs/profiler.html#onrender-callback Profiler API}
409
405
  */
410
406
  type ProfilerOnRenderCallback = (
411
407
  id: string,
@@ -892,8 +888,7 @@ declare namespace React {
892
888
  type DependencyList = ReadonlyArray<any>;
893
889
 
894
890
  // NOTE: callbacks are _only_ allowed to return either void, or a destructor.
895
- // The destructor is itself only allowed to return void.
896
- type EffectCallback = () => (void | (() => void | undefined));
891
+ type EffectCallback = () => (void | Destructor);
897
892
 
898
893
  interface MutableRefObject<T> {
899
894
  current: T;
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "16.14.2",
3
+ "version": "16.14.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": "36c10b8c6b898fde912c62245ed9f63a2addbc19f40999bc97024af14d80b409",
148
- "typeScriptVersion": "3.3"
148
+ "typesPublisherContentHash": "601bc56cb847f4ec8ada71015a029ed2646b886c79ded7bd90bbb5b0dec7da74",
149
+ "typeScriptVersion": "3.5"
149
150
  }