@types/react 16.9.2 → 16.9.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.
Files changed (3) hide show
  1. react/README.md +1 -1
  2. react/index.d.ts +9 -1
  3. 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: Thu, 15 Aug 2019 22:54:53 GMT
11
+ * Last updated: Mon, 14 Oct 2019 21:08:21 GMT
12
12
  * Dependencies: @types/csstype, @types/prop-types
13
13
  * Global values: React
14
14
 
react/index.d.ts CHANGED
@@ -85,6 +85,10 @@ declare namespace React {
85
85
 
86
86
  type ComponentState = any;
87
87
 
88
+ /**
89
+ * @internal You shouldn't need to use this type since you never see these attributes
90
+ * inside your component or have to validate them.
91
+ */
88
92
  interface Attributes {
89
93
  key?: Key;
90
94
  }
@@ -415,7 +419,10 @@ declare namespace React {
415
419
  *
416
420
  * ```ts
417
421
  * static contextType = MyContext
422
+ * // For TS pre-3.7:
418
423
  * context!: React.ContextType<typeof MyContext>
424
+ * // For TS 3.7 and above:
425
+ * declare context: React.ContextType<typeof MyContext>
419
426
  * ```
420
427
  *
421
428
  * @deprecated if used without a type annotation, or without static contextType
@@ -725,6 +732,7 @@ declare namespace React {
725
732
  // but can be given its own specific name
726
733
  interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> {
727
734
  defaultProps?: Partial<P>;
735
+ propTypes?: WeakValidationMap<P>;
728
736
  }
729
737
 
730
738
  function forwardRef<T, P = {}>(Component: RefForwardingComponent<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
@@ -1628,7 +1636,7 @@ declare namespace React {
1628
1636
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1629
1637
  // React-specific Attributes
1630
1638
  defaultChecked?: boolean;
1631
- defaultValue?: string | string[];
1639
+ defaultValue?: string | number | string[];
1632
1640
  suppressContentEditableWarning?: boolean;
1633
1641
  suppressHydrationWarning?: boolean;
1634
1642
 
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "16.9.2",
3
+ "version": "16.9.6",
4
4
  "description": "TypeScript definitions for React",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -114,6 +114,6 @@
114
114
  "@types/prop-types": "*",
115
115
  "csstype": "^2.2.0"
116
116
  },
117
- "typesPublisherContentHash": "83c2206d0fc3985c58e54bde8c44d67dff202769ed06c056da97c7cbd34d8c4c",
117
+ "typesPublisherContentHash": "136048ee08f939e620cd1f168220d12c7ae5302858a5625ae5b76e3c2fd3af64",
118
118
  "typeScriptVersion": "2.8"
119
119
  }