@types/react 17.0.58 → 17.0.60
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 v17.0/README.md +1 -1
- react v17.0/index.d.ts +37 -3
- react v17.0/package.json +2 -2
react v17.0/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/v17.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Thu, 25 May 2023 20:34:36 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
|
13
13
|
* Global values: `React`
|
14
14
|
|
react v17.0/index.d.ts
CHANGED
@@ -1310,7 +1310,7 @@ declare namespace React {
|
|
1310
1310
|
// ----------------------------------------------------------------------
|
1311
1311
|
|
1312
1312
|
/**
|
1313
|
-
* @deprecated
|
1313
|
+
* @deprecated This was used to allow clients to pass `ref` and `key`
|
1314
1314
|
* to `createElement`, which is no longer necessary due to intersection
|
1315
1315
|
* types. If you need to declare a props object before passing it to
|
1316
1316
|
* `createElement` or a factory, use `ClassAttributes<T>`:
|
@@ -1337,6 +1337,9 @@ declare namespace React {
|
|
1337
1337
|
interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
|
1338
1338
|
}
|
1339
1339
|
|
1340
|
+
interface SVGLineElementAttributes<T> extends SVGProps<T> {}
|
1341
|
+
interface SVGTextElementAttributes<T> extends SVGProps<T> {}
|
1342
|
+
|
1340
1343
|
interface DOMAttributes<T> {
|
1341
1344
|
children?: ReactNode | undefined;
|
1342
1345
|
dangerouslySetInnerHTML?: {
|
@@ -3019,6 +3022,19 @@ declare namespace React {
|
|
3019
3022
|
*/
|
3020
3023
|
componentStack: string;
|
3021
3024
|
}
|
3025
|
+
|
3026
|
+
namespace JSX {
|
3027
|
+
interface Element extends GlobalJSXElement {}
|
3028
|
+
interface ElementClass extends GlobalJSXElementClass {}
|
3029
|
+
interface ElementAttributesProperty extends GlobalJSXElementAttributesProperty {}
|
3030
|
+
interface ElementChildrenAttribute extends GlobalJSXElementChildrenAttribute {}
|
3031
|
+
|
3032
|
+
type LibraryManagedAttributes<C, P> = GlobalJSXLibraryManagedAttributes<C, P>;
|
3033
|
+
|
3034
|
+
interface IntrinsicAttributes extends GlobalJSXIntrinsicAttributes {}
|
3035
|
+
interface IntrinsicClassAttributes<T> extends GlobalJSXIntrinsicClassAttributes<T> {}
|
3036
|
+
interface IntrinsicElements extends GlobalJSXIntrinsicElements {}
|
3037
|
+
}
|
3022
3038
|
}
|
3023
3039
|
|
3024
3040
|
// naked 'any' type in a conditional type will short circuit and union both the then/else branches
|
@@ -3064,6 +3080,9 @@ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps
|
|
3064
3080
|
: P;
|
3065
3081
|
|
3066
3082
|
declare global {
|
3083
|
+
/**
|
3084
|
+
* @deprecated Use `React.JSX` instead of the global `JSX` namespace.
|
3085
|
+
*/
|
3067
3086
|
namespace JSX {
|
3068
3087
|
interface Element extends React.ReactElement<any, any> { }
|
3069
3088
|
interface ElementClass extends React.Component<any> {
|
@@ -3243,7 +3262,7 @@ declare global {
|
|
3243
3262
|
foreignObject: React.SVGProps<SVGForeignObjectElement>;
|
3244
3263
|
g: React.SVGProps<SVGGElement>;
|
3245
3264
|
image: React.SVGProps<SVGImageElement>;
|
3246
|
-
line: React.
|
3265
|
+
line: React.SVGLineElementAttributes<SVGLineElement>;
|
3247
3266
|
linearGradient: React.SVGProps<SVGLinearGradientElement>;
|
3248
3267
|
marker: React.SVGProps<SVGMarkerElement>;
|
3249
3268
|
mask: React.SVGProps<SVGMaskElement>;
|
@@ -3258,7 +3277,7 @@ declare global {
|
|
3258
3277
|
stop: React.SVGProps<SVGStopElement>;
|
3259
3278
|
switch: React.SVGProps<SVGSwitchElement>;
|
3260
3279
|
symbol: React.SVGProps<SVGSymbolElement>;
|
3261
|
-
text: React.
|
3280
|
+
text: React.SVGTextElementAttributes<SVGTextElement>;
|
3262
3281
|
textPath: React.SVGProps<SVGTextPathElement>;
|
3263
3282
|
tspan: React.SVGProps<SVGTSpanElement>;
|
3264
3283
|
use: React.SVGProps<SVGUseElement>;
|
@@ -3266,3 +3285,18 @@ declare global {
|
|
3266
3285
|
}
|
3267
3286
|
}
|
3268
3287
|
}
|
3288
|
+
|
3289
|
+
// React.JSX needs to point to global.JSX to keep global module augmentations intact.
|
3290
|
+
// But we can't access global.JSX so we need to create these aliases instead.
|
3291
|
+
// Once the global JSX namespace will be removed we replace React.JSX with the contents of global.JSX
|
3292
|
+
interface GlobalJSXElement extends JSX.Element {}
|
3293
|
+
interface GlobalJSXElementClass extends JSX.ElementClass {}
|
3294
|
+
interface GlobalJSXElementAttributesProperty extends JSX.ElementAttributesProperty {}
|
3295
|
+
interface GlobalJSXElementChildrenAttribute extends JSX.ElementChildrenAttribute {}
|
3296
|
+
|
3297
|
+
type GlobalJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<C, P>;
|
3298
|
+
|
3299
|
+
interface GlobalJSXIntrinsicAttributes extends JSX.IntrinsicAttributes {}
|
3300
|
+
interface GlobalJSXIntrinsicClassAttributes<T> extends JSX.IntrinsicClassAttributes<T> {}
|
3301
|
+
|
3302
|
+
interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}
|
react v17.0/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.60",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,7 +146,7 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
149
|
+
"typesPublisherContentHash": "a1ac6ee7ef49829a44bf81fb4d727ced804116c06b1db553346b889a38622e7a",
|
150
150
|
"typeScriptVersion": "4.3",
|
151
151
|
"exports": {
|
152
152
|
".": {
|