@types/react 18.2.43 → 18.2.45

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: Sat, 09 Dec 2023 13:06:57 GMT
11
+ * Last updated: Wed, 13 Dec 2023 01:31:25 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
@@ -37,10 +37,8 @@ declare namespace React {
37
37
  // React Elements
38
38
  // ----------------------------------------------------------------------
39
39
 
40
- type ElementType<P = any> =
41
- | {
42
- [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never;
43
- }[keyof JSX.IntrinsicElements]
40
+ type ElementType<P = any, Tag extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements> =
41
+ | { [K in Tag]: P extends JSX.IntrinsicElements[K] ? K : never }[Tag]
44
42
  | ComponentType<P>;
45
43
  type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
46
44
 
@@ -1651,7 +1649,7 @@ declare namespace React {
1651
1649
  onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
1652
1650
  }
1653
1651
 
1654
- export interface CSSProperties extends CSS.Properties<string | number> {
1652
+ export interface CSSProperties extends CSS.Properties<(string & {}) | number> {
1655
1653
  /**
1656
1654
  * The index signature was removed to enable closed typing for style
1657
1655
  * using CSSType. You're able to use type assertion or module augmentation
@@ -2245,6 +2243,7 @@ declare namespace React {
2245
2243
  interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
2246
2244
  open?: boolean | undefined;
2247
2245
  onToggle?: ReactEventHandler<T> | undefined;
2246
+ name?: string | undefined;
2248
2247
  }
2249
2248
 
2250
2249
  interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.2.43",
3
+ "version": "18.2.45",
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": "13554309eed9d8e30eb9feda1cb917d4559729be1a4808a10ec91793edd79ef7",
204
+ "typesPublisherContentHash": "52bd9404a47ca2841981d78f2871edff8b4c67bb30031d6daf17c34a9126b0c9",
205
205
  "typeScriptVersion": "4.6"
206
206
  }
react/ts5.0/index.d.ts CHANGED
@@ -1652,7 +1652,7 @@ declare namespace React {
1652
1652
  onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
1653
1653
  }
1654
1654
 
1655
- export interface CSSProperties extends CSS.Properties<string | number> {
1655
+ export interface CSSProperties extends CSS.Properties<(string & {}) | number> {
1656
1656
  /**
1657
1657
  * The index signature was removed to enable closed typing for style
1658
1658
  * using CSSType. You're able to use type assertion or module augmentation
@@ -2246,6 +2246,7 @@ declare namespace React {
2246
2246
  interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
2247
2247
  open?: boolean | undefined;
2248
2248
  onToggle?: ReactEventHandler<T> | undefined;
2249
+ name?: string | undefined;
2249
2250
  }
2250
2251
 
2251
2252
  interface DelHTMLAttributes<T> extends HTMLAttributes<T> {