@types/react 18.3.17 → 18.3.19

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 v18.3/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/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 16 Dec 2024 12:44:17 GMT
11
+ * Last updated: Wed, 19 Mar 2025 15:02:26 GMT
12
12
  * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react v18.3/index.d.ts CHANGED
@@ -382,37 +382,44 @@ declare namespace React {
382
382
  // Factories
383
383
  // ----------------------------------------------------------------------
384
384
 
385
+ /** @deprecated */
385
386
  type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
386
387
 
387
- /**
388
- * @deprecated Please use `FunctionComponentFactory`
389
- */
388
+ /** @deprecated */
390
389
  type SFCFactory<P> = FunctionComponentFactory<P>;
391
390
 
391
+ /** @deprecated */
392
392
  type FunctionComponentFactory<P> = (
393
393
  props?: Attributes & P,
394
394
  ...children: ReactNode[]
395
395
  ) => FunctionComponentElement<P>;
396
396
 
397
+ /** @deprecated */
397
398
  type ComponentFactory<P, T extends Component<P, ComponentState>> = (
398
399
  props?: ClassAttributes<T> & P,
399
400
  ...children: ReactNode[]
400
401
  ) => CElement<P, T>;
401
402
 
403
+ /** @deprecated */
402
404
  type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
405
+ /** @deprecated */
403
406
  type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
404
407
 
408
+ /** @deprecated */
405
409
  type DOMFactory<P extends DOMAttributes<T>, T extends Element> = (
406
410
  props?: ClassAttributes<T> & P | null,
407
411
  ...children: ReactNode[]
408
412
  ) => DOMElement<P, T>;
409
413
 
414
+ /** @deprecated */
410
415
  interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
411
416
 
417
+ /** @deprecated */
412
418
  interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
413
419
  (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
414
420
  }
415
421
 
422
+ /** @deprecated */
416
423
  interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
417
424
  (
418
425
  props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null,
@@ -2961,6 +2968,14 @@ declare namespace React {
2961
2968
  * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is}
2962
2969
  */
2963
2970
  is?: string | undefined;
2971
+ /**
2972
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}
2973
+ */
2974
+ exportparts?: string | undefined;
2975
+ /**
2976
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}
2977
+ */
2978
+ part?: string | undefined;
2964
2979
  }
2965
2980
 
2966
2981
  /**
@@ -3951,6 +3966,7 @@ declare namespace React {
3951
3966
  // React.DOM
3952
3967
  // ----------------------------------------------------------------------
3953
3968
 
3969
+ /* deprecated */
3954
3970
  interface ReactHTML {
3955
3971
  a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
3956
3972
  abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
@@ -4072,6 +4088,7 @@ declare namespace React {
4072
4088
  webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
4073
4089
  }
4074
4090
 
4091
+ /* deprecated */
4075
4092
  interface ReactSVG {
4076
4093
  animate: SVGFactory;
4077
4094
  circle: SVGFactory;
@@ -4130,6 +4147,7 @@ declare namespace React {
4130
4147
  view: SVGFactory;
4131
4148
  }
4132
4149
 
4150
+ /* deprecated */
4133
4151
  interface ReactDOM extends ReactHTML, ReactSVG {}
4134
4152
 
4135
4153
  //
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.3.17",
3
+ "version": "18.3.19",
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
  "csstype": "^3.0.2"
202
202
  },
203
203
  "peerDependencies": {},
204
- "typesPublisherContentHash": "f8c1650d1099e4f098246067ac4105b0fa376c5cb8197c08daab74d4dc2defbd",
204
+ "typesPublisherContentHash": "95d6f59e5d1d5d7919a7957d7fd1924d24936037d9cfe18023c590b125051088",
205
205
  "typeScriptVersion": "5.0"
206
206
  }
@@ -382,37 +382,44 @@ declare namespace React {
382
382
  // Factories
383
383
  // ----------------------------------------------------------------------
384
384
 
385
+ /** @deprecated */
385
386
  type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
386
387
 
387
- /**
388
- * @deprecated Please use `FunctionComponentFactory`
389
- */
388
+ /** @deprecated */
390
389
  type SFCFactory<P> = FunctionComponentFactory<P>;
391
390
 
391
+ /** @deprecated */
392
392
  type FunctionComponentFactory<P> = (
393
393
  props?: Attributes & P,
394
394
  ...children: ReactNode[]
395
395
  ) => FunctionComponentElement<P>;
396
396
 
397
+ /** @deprecated */
397
398
  type ComponentFactory<P, T extends Component<P, ComponentState>> = (
398
399
  props?: ClassAttributes<T> & P,
399
400
  ...children: ReactNode[]
400
401
  ) => CElement<P, T>;
401
402
 
403
+ /** @deprecated */
402
404
  type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
405
+ /** @deprecated */
403
406
  type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
404
407
 
408
+ /** @deprecated */
405
409
  type DOMFactory<P extends DOMAttributes<T>, T extends Element> = (
406
410
  props?: ClassAttributes<T> & P | null,
407
411
  ...children: ReactNode[]
408
412
  ) => DOMElement<P, T>;
409
413
 
414
+ /** @deprecated */
410
415
  interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {}
411
416
 
417
+ /** @deprecated */
412
418
  interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
413
419
  (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
414
420
  }
415
421
 
422
+ /** @deprecated */
416
423
  interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
417
424
  (
418
425
  props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null,
@@ -2962,6 +2969,14 @@ declare namespace React {
2962
2969
  * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is}
2963
2970
  */
2964
2971
  is?: string | undefined;
2972
+ /**
2973
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}
2974
+ */
2975
+ exportparts?: string | undefined;
2976
+ /**
2977
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}
2978
+ */
2979
+ part?: string | undefined;
2965
2980
  }
2966
2981
 
2967
2982
  /**
@@ -3952,6 +3967,7 @@ declare namespace React {
3952
3967
  // React.DOM
3953
3968
  // ----------------------------------------------------------------------
3954
3969
 
3970
+ /* deprecated */
3955
3971
  interface ReactHTML {
3956
3972
  a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
3957
3973
  abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
@@ -4073,6 +4089,7 @@ declare namespace React {
4073
4089
  webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
4074
4090
  }
4075
4091
 
4092
+ /* deprecated */
4076
4093
  interface ReactSVG {
4077
4094
  animate: SVGFactory;
4078
4095
  circle: SVGFactory;
@@ -4131,6 +4148,7 @@ declare namespace React {
4131
4148
  view: SVGFactory;
4132
4149
  }
4133
4150
 
4151
+ /* deprecated */
4134
4152
  interface ReactDOM extends ReactHTML, ReactSVG {}
4135
4153
 
4136
4154
  //