@types/react 18.3.16 → 18.3.18
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 +1 -1
- react v18.3/index.d.ts +14 -4
- react v18.3/package.json +2 -2
- react v18.3/ts5.0/index.d.ts +14 -4
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:
|
11
|
+
* Last updated: Fri, 20 Dec 2024 01:29:27 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,
|
@@ -2010,7 +2017,7 @@ declare namespace React {
|
|
2010
2017
|
* @version 16.8.0
|
2011
2018
|
* @see {@link https://react.dev/reference/react/useRef}
|
2012
2019
|
*/
|
2013
|
-
function useRef<T = undefined>(): MutableRefObject<T | undefined>;
|
2020
|
+
function useRef<T = undefined>(initialValue?: undefined): MutableRefObject<T | undefined>;
|
2014
2021
|
/**
|
2015
2022
|
* The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
|
2016
2023
|
* Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
|
@@ -3951,6 +3958,7 @@ declare namespace React {
|
|
3951
3958
|
// React.DOM
|
3952
3959
|
// ----------------------------------------------------------------------
|
3953
3960
|
|
3961
|
+
/* deprecated */
|
3954
3962
|
interface ReactHTML {
|
3955
3963
|
a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
3956
3964
|
abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
|
@@ -4072,6 +4080,7 @@ declare namespace React {
|
|
4072
4080
|
webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
|
4073
4081
|
}
|
4074
4082
|
|
4083
|
+
/* deprecated */
|
4075
4084
|
interface ReactSVG {
|
4076
4085
|
animate: SVGFactory;
|
4077
4086
|
circle: SVGFactory;
|
@@ -4130,6 +4139,7 @@ declare namespace React {
|
|
4130
4139
|
view: SVGFactory;
|
4131
4140
|
}
|
4132
4141
|
|
4142
|
+
/* deprecated */
|
4133
4143
|
interface ReactDOM extends ReactHTML, ReactSVG {}
|
4134
4144
|
|
4135
4145
|
//
|
react v18.3/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.3.
|
3
|
+
"version": "18.3.18",
|
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": "
|
204
|
+
"typesPublisherContentHash": "81d02733b891f7777cc155d7075ba09f503c623f0782022d40d2c0d7f36a2185",
|
205
205
|
"typeScriptVersion": "5.0"
|
206
206
|
}
|
react v18.3/ts5.0/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,
|
@@ -2011,7 +2018,7 @@ declare namespace React {
|
|
2011
2018
|
* @version 16.8.0
|
2012
2019
|
* @see {@link https://react.dev/reference/react/useRef}
|
2013
2020
|
*/
|
2014
|
-
function useRef<T = undefined>(): MutableRefObject<T | undefined>;
|
2021
|
+
function useRef<T = undefined>(initialValue?: undefined): MutableRefObject<T | undefined>;
|
2015
2022
|
/**
|
2016
2023
|
* The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
|
2017
2024
|
* Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
|
@@ -3952,6 +3959,7 @@ declare namespace React {
|
|
3952
3959
|
// React.DOM
|
3953
3960
|
// ----------------------------------------------------------------------
|
3954
3961
|
|
3962
|
+
/* deprecated */
|
3955
3963
|
interface ReactHTML {
|
3956
3964
|
a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
3957
3965
|
abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
|
@@ -4073,6 +4081,7 @@ declare namespace React {
|
|
4073
4081
|
webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
|
4074
4082
|
}
|
4075
4083
|
|
4084
|
+
/* deprecated */
|
4076
4085
|
interface ReactSVG {
|
4077
4086
|
animate: SVGFactory;
|
4078
4087
|
circle: SVGFactory;
|
@@ -4131,6 +4140,7 @@ declare namespace React {
|
|
4131
4140
|
view: SVGFactory;
|
4132
4141
|
}
|
4133
4142
|
|
4143
|
+
/* deprecated */
|
4134
4144
|
interface ReactDOM extends ReactHTML, ReactSVG {}
|
4135
4145
|
|
4136
4146
|
//
|