@types/react 18.0.31 → 18.0.32

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 +10 -0
  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: Tue, 28 Mar 2023 22:03:14 GMT
11
+ * Last updated: Sun, 02 Apr 2023 08:03:03 GMT
12
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
 
react/index.d.ts CHANGED
@@ -132,9 +132,19 @@ declare namespace React {
132
132
  key?: Key | null | undefined;
133
133
  }
134
134
  interface RefAttributes<T> extends Attributes {
135
+ /**
136
+ * Allows getting a ref to the component instance.
137
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
138
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
139
+ */
135
140
  ref?: Ref<T> | undefined;
136
141
  }
137
142
  interface ClassAttributes<T> extends Attributes {
143
+ /**
144
+ * Allows getting a ref to the component instance.
145
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
146
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
147
+ */
138
148
  ref?: LegacyRef<T> | undefined;
139
149
  }
140
150
 
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.0.31",
3
+ "version": "18.0.32",
4
4
  "description": "TypeScript definitions for React",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -151,7 +151,7 @@
151
151
  "@types/scheduler": "*",
152
152
  "csstype": "^3.0.2"
153
153
  },
154
- "typesPublisherContentHash": "cdd516b34f9b1735bd2460166eff3a937ca51e3d88312f285eb556789b086b8f",
154
+ "typesPublisherContentHash": "9d1d2419e093ce4580bee436a8317e227c17aa05565bf064ec3990a5742ad403",
155
155
  "typeScriptVersion": "4.3",
156
156
  "exports": {
157
157
  ".": {