@types/react 18.2.68 → 18.2.70
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/canary.d.ts +4 -0
- react/index.d.ts +12 -2
- react/package.json +2 -2
- react/ts5.0/canary.d.ts +4 -0
- react/ts5.0/index.d.ts +12 -2
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:
|
11
|
+
* Last updated: Mon, 25 Mar 2024 09:35:32 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> = {
|
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.
|
@@ -985,7 +995,7 @@ declare namespace React {
|
|
985
995
|
*/
|
986
996
|
context: unknown;
|
987
997
|
|
988
|
-
constructor(props:
|
998
|
+
constructor(props: P);
|
989
999
|
/**
|
990
1000
|
* @deprecated
|
991
1001
|
* @see {@link https://legacy.reactjs.org/docs/legacy-context.html React Docs}
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.2.
|
3
|
+
"version": "18.2.70",
|
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": "
|
209
|
+
"typesPublisherContentHash": "73fd0bbfbb1887efb5bc0d6baf9a096118379ae3db40b4eadd11d127d729c42c",
|
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> = {
|
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.
|
@@ -986,7 +996,7 @@ declare namespace React {
|
|
986
996
|
*/
|
987
997
|
context: unknown;
|
988
998
|
|
989
|
-
constructor(props:
|
999
|
+
constructor(props: P);
|
990
1000
|
/**
|
991
1001
|
* @deprecated
|
992
1002
|
* @see {@link https://legacy.reactjs.org/docs/legacy-context.html React Docs}
|