@types/react 18.2.31 → 18.2.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.
- react/README.md +1 -1
- react/index.d.ts +4 -1
- react/package.json +2 -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: Wed, 25 Oct 2023 14:17:12 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/index.d.ts
CHANGED
@@ -1130,7 +1130,7 @@ declare namespace React {
|
|
1130
1130
|
* @see https://react.dev/reference/react/useMemo
|
1131
1131
|
*/
|
1132
1132
|
// allow undefined, but don't make it optional as that is very likely a mistake
|
1133
|
-
function useMemo<T>(factory: () => T
|
1133
|
+
function useMemo<T>(factory: ExcludeVoidFn<() => T>, deps: DependencyList | undefined): T;
|
1134
1134
|
/**
|
1135
1135
|
* `useDebugValue` can be used to display a label for custom hooks in React DevTools.
|
1136
1136
|
*
|
@@ -3272,6 +3272,9 @@ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps
|
|
3272
3272
|
: C extends { defaultProps: infer D } ? Defaultize<P, D>
|
3273
3273
|
: P;
|
3274
3274
|
|
3275
|
+
// Exclude implicity return undefined
|
3276
|
+
type ExcludeVoidFn<T extends () => unknown> = (() => void) extends T ? never : T;
|
3277
|
+
|
3275
3278
|
declare global {
|
3276
3279
|
/**
|
3277
3280
|
* @deprecated Use `React.JSX` instead of the global `JSX` namespace.
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.2.
|
3
|
+
"version": "18.2.32",
|
4
4
|
"description": "TypeScript definitions for react",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -201,6 +201,6 @@
|
|
201
201
|
"@types/scheduler": "*",
|
202
202
|
"csstype": "^3.0.2"
|
203
203
|
},
|
204
|
-
"typesPublisherContentHash": "
|
204
|
+
"typesPublisherContentHash": "24f4a83d3df645820fee0caa89d248672c61bf11176baee7747c2f1dc3c24dd3",
|
205
205
|
"typeScriptVersion": "4.5"
|
206
206
|
}
|