@types/react 18.2.68 → 18.2.69

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 CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for react (https://react.dev/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 22 Mar 2024 18:07:25 GMT
11
+ * Last updated: Fri, 22 Mar 2024 19:35:52 GMT
12
12
  * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler), [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/canary.d.ts CHANGED
@@ -109,4 +109,8 @@ declare module "." {
109
109
  passthrough: State,
110
110
  reducer: (state: State, action: Action) => State,
111
111
  ): [State, (action: Action) => void];
112
+
113
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
114
+ cleanup: () => VoidOrUndefinedOnly;
115
+ }
112
116
  }
react/index.d.ts CHANGED
@@ -155,6 +155,8 @@ declare namespace React {
155
155
  readonly current: T | null;
156
156
  }
157
157
 
158
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
159
+ }
158
160
  /**
159
161
  * A callback fired whenever the ref's value changes.
160
162
  *
@@ -168,7 +170,15 @@ declare namespace React {
168
170
  * <div ref={(node) => console.log(node)} />
169
171
  * ```
170
172
  */
171
- type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
173
+ type RefCallback<T> = {
174
+ bivarianceHack(
175
+ instance: T | null,
176
+ ):
177
+ | void
178
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[
179
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES
180
+ ];
181
+ }["bivarianceHack"];
172
182
 
173
183
  /**
174
184
  * A union type of all possible shapes for React refs.
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.2.68",
3
+ "version": "18.2.69",
4
4
  "description": "TypeScript definitions for react",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -206,6 +206,6 @@
206
206
  "@types/scheduler": "*",
207
207
  "csstype": "^3.0.2"
208
208
  },
209
- "typesPublisherContentHash": "5afa771a44d504996ddef98e8c46637a7f0982faf7948711f56a93e313a2b283",
209
+ "typesPublisherContentHash": "a5439cab82f6b305cd6e219e60d20a0000468bf15584605d299749f947321ec7",
210
210
  "typeScriptVersion": "4.7"
211
211
  }
react/ts5.0/canary.d.ts CHANGED
@@ -109,4 +109,8 @@ declare module "." {
109
109
  passthrough: State,
110
110
  reducer: (state: State, action: Action) => State,
111
111
  ): [State, (action: Action) => void];
112
+
113
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
114
+ cleanup: () => VoidOrUndefinedOnly;
115
+ }
112
116
  }
react/ts5.0/index.d.ts CHANGED
@@ -155,6 +155,8 @@ declare namespace React {
155
155
  readonly current: T | null;
156
156
  }
157
157
 
158
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
159
+ }
158
160
  /**
159
161
  * A callback fired whenever the ref's value changes.
160
162
  *
@@ -168,7 +170,15 @@ declare namespace React {
168
170
  * <div ref={(node) => console.log(node)} />
169
171
  * ```
170
172
  */
171
- type RefCallback<T> = { bivarianceHack(instance: T | null): void }["bivarianceHack"];
173
+ type RefCallback<T> = {
174
+ bivarianceHack(
175
+ instance: T | null,
176
+ ):
177
+ | void
178
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[
179
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES
180
+ ];
181
+ }["bivarianceHack"];
172
182
 
173
183
  /**
174
184
  * A union type of all possible shapes for React refs.