@types/react 18.0.26 → 18.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.
Files changed (3) hide show
  1. react/README.md +1 -1
  2. react/index.d.ts +7 -7
  3. 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: Fri, 02 Dec 2022 14:32:55 GMT
11
+ * Last updated: Sat, 11 Feb 2023 11:32:31 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/index.d.ts CHANGED
@@ -782,10 +782,10 @@ declare namespace React {
782
782
 
783
783
  /** Ensures that the props do not include ref at all */
784
784
  type PropsWithoutRef<P> =
785
- // Pick would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
785
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
786
786
  // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
787
787
  // https://github.com/Microsoft/TypeScript/issues/28339
788
- P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;
788
+ P extends any ? ('ref' extends keyof P ? Omit<P, 'ref'> : P) : P;
789
789
  /** Ensures that the props do not include string ref, which cannot be forwarded */
790
790
  type PropsWithRef<P> =
791
791
  // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
@@ -1940,7 +1940,7 @@ declare namespace React {
1940
1940
  content?: string | undefined;
1941
1941
  controls?: boolean | undefined;
1942
1942
  coords?: string | undefined;
1943
- crossOrigin?: string | undefined;
1943
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
1944
1944
  data?: string | undefined;
1945
1945
  dateTime?: string | undefined;
1946
1946
  default?: boolean | undefined;
@@ -2228,7 +2228,7 @@ declare namespace React {
2228
2228
  autoFocus?: boolean | undefined;
2229
2229
  capture?: boolean | 'user' | 'environment' | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
2230
2230
  checked?: boolean | undefined;
2231
- crossOrigin?: string | undefined;
2231
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2232
2232
  disabled?: boolean | undefined;
2233
2233
  enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
2234
2234
  form?: string | undefined;
@@ -2280,7 +2280,7 @@ declare namespace React {
2280
2280
 
2281
2281
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
2282
2282
  as?: string | undefined;
2283
- crossOrigin?: string | undefined;
2283
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2284
2284
  href?: string | undefined;
2285
2285
  hrefLang?: string | undefined;
2286
2286
  integrity?: string | undefined;
@@ -2306,7 +2306,7 @@ declare namespace React {
2306
2306
  autoPlay?: boolean | undefined;
2307
2307
  controls?: boolean | undefined;
2308
2308
  controlsList?: string | undefined;
2309
- crossOrigin?: string | undefined;
2309
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2310
2310
  loop?: boolean | undefined;
2311
2311
  mediaGroup?: string | undefined;
2312
2312
  muted?: boolean | undefined;
@@ -2391,7 +2391,7 @@ declare namespace React {
2391
2391
  async?: boolean | undefined;
2392
2392
  /** @deprecated */
2393
2393
  charSet?: string | undefined;
2394
- crossOrigin?: string | undefined;
2394
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2395
2395
  defer?: boolean | undefined;
2396
2396
  integrity?: string | undefined;
2397
2397
  noModule?: boolean | undefined;
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.0.26",
3
+ "version": "18.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",
@@ -151,7 +151,7 @@
151
151
  "@types/scheduler": "*",
152
152
  "csstype": "^3.0.2"
153
153
  },
154
- "typesPublisherContentHash": "cd368694add669e79e789ca680189618952e6297696daf9408b8ce05464bd413",
154
+ "typesPublisherContentHash": "e076890b68b7d34ef2996e940b3e58ca0dcc845e64518f22023dbdd3b6f6a8bd",
155
155
  "typeScriptVersion": "4.2",
156
156
  "exports": {
157
157
  ".": {