@types/react 17.0.24 → 17.0.28
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/experimental.d.ts +8 -0
- react/index.d.ts +6 -5
- react/package.json +2 -2
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (http://facebook.github.io/reac
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Tue,
|
11
|
+
* Last updated: Tue, 12 Oct 2021 08:01:22 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/experimental.d.ts
CHANGED
@@ -51,4 +51,12 @@ declare module '.' {
|
|
51
51
|
getSnapshot: () => Snapshot,
|
52
52
|
getServerSnapshot?: () => Snapshot,
|
53
53
|
): Snapshot;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* @param effect Imperative function that can return a cleanup function
|
57
|
+
* @param deps If present, effect will only activate if the values in the list change.
|
58
|
+
*
|
59
|
+
* @see https://github.com/facebook/react/pull/21913
|
60
|
+
*/
|
61
|
+
export function unstable_useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void;
|
54
62
|
}
|
react/index.d.ts
CHANGED
@@ -348,7 +348,7 @@ declare namespace React {
|
|
348
348
|
// However, we have no way of telling the JSX parser that it's a JSX element type or its props other than
|
349
349
|
// by pretending to be a normal component.
|
350
350
|
//
|
351
|
-
// We don't just use ComponentType or
|
351
|
+
// We don't just use ComponentType or FunctionComponent types because you are not supposed to attach statics to this
|
352
352
|
// object, but rather to the original function.
|
353
353
|
interface ExoticComponent<P = {}> {
|
354
354
|
/**
|
@@ -854,7 +854,7 @@ declare namespace React {
|
|
854
854
|
};
|
855
855
|
|
856
856
|
function memo<P extends object>(
|
857
|
-
Component:
|
857
|
+
Component: FunctionComponent<P>,
|
858
858
|
propsAreEqual?: (prevProps: Readonly<PropsWithChildren<P>>, nextProps: Readonly<PropsWithChildren<P>>) => boolean
|
859
859
|
): NamedExoticComponent<P>;
|
860
860
|
function memo<T extends ComponentType<any>>(
|
@@ -1193,9 +1193,9 @@ declare namespace React {
|
|
1193
1193
|
isPrimary: boolean;
|
1194
1194
|
}
|
1195
1195
|
|
1196
|
-
interface FocusEvent<
|
1197
|
-
relatedTarget: EventTarget | null;
|
1198
|
-
target: EventTarget &
|
1196
|
+
interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, NativeFocusEvent> {
|
1197
|
+
relatedTarget: (EventTarget & RelatedTarget) | null;
|
1198
|
+
target: EventTarget & Target;
|
1199
1199
|
}
|
1200
1200
|
|
1201
1201
|
interface FormEvent<T = Element> extends SyntheticEvent<T> {
|
@@ -2255,6 +2255,7 @@ declare namespace React {
|
|
2255
2255
|
hrefLang?: string | undefined;
|
2256
2256
|
integrity?: string | undefined;
|
2257
2257
|
media?: string | undefined;
|
2258
|
+
imageSrcSet?: string | undefined;
|
2258
2259
|
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
|
2259
2260
|
rel?: string | undefined;
|
2260
2261
|
sizes?: string | undefined;
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.28",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,6 +146,6 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
149
|
+
"typesPublisherContentHash": "6ac2ef214362ee7c34d45d2d010c3f7b8b85bea702e7a3c2763e643697f09cc2",
|
150
150
|
"typeScriptVersion": "3.7"
|
151
151
|
}
|