@types/react 16.14.18 → 16.14.22

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 v16.14/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 21 Oct 2021 02:01:32 GMT
11
+ * Last updated: Thu, 27 Jan 2022 21:01:41 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 v16.14/index.d.ts CHANGED
@@ -557,8 +557,10 @@ declare namespace React {
557
557
  displayName?: string | undefined;
558
558
  }
559
559
 
560
+ type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;
561
+
560
562
  interface ForwardRefRenderFunction<T, P = {}> {
561
- (props: PropsWithChildren<P>, ref: ((instance: T | null) => void) | MutableRefObject<T | null> | null): ReactElement | null;
563
+ (props: PropsWithChildren<P>, ref: ForwardedRef<T>): ReactElement | null;
562
564
  displayName?: string | undefined;
563
565
  // explicit rejected with `never` required due to
564
566
  // https://github.com/microsoft/TypeScript/issues/36826
@@ -831,7 +833,7 @@ declare namespace React {
831
833
  ? JSX.IntrinsicElements[T]
832
834
  : {};
833
835
  type ComponentPropsWithRef<T extends ElementType> =
834
- T extends ComponentClass<infer P>
836
+ T extends (new (props: infer P) => Component<any, any>)
835
837
  ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
836
838
  : PropsWithRef<ComponentProps<T>>;
837
839
  type ComponentPropsWithoutRef<T extends ElementType> =
@@ -1208,7 +1210,7 @@ declare namespace React {
1208
1210
  target: EventTarget & T;
1209
1211
  }
1210
1212
 
1211
- interface KeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> {
1213
+ interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1212
1214
  altKey: boolean;
1213
1215
  /** @deprecated */
1214
1216
  charCode: number;
@@ -2252,6 +2254,7 @@ declare namespace React {
2252
2254
  href?: string | undefined;
2253
2255
  hrefLang?: string | undefined;
2254
2256
  integrity?: string | undefined;
2257
+ imageSrcSet?: string | undefined;
2255
2258
  media?: string | undefined;
2256
2259
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2257
2260
  rel?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "16.14.18",
3
+ "version": "16.14.22",
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": "07dd37052656d009f9c08626e97c86fdeec59567d542d7aa095cc95e52a26efa",
150
- "typeScriptVersion": "3.7"
149
+ "typesPublisherContentHash": "705173b242e48f91312ce0e76e94db276c14224ab37c34a021284181b8252371",
150
+ "typeScriptVersion": "3.8"
151
151
  }