@types/react 19.1.1 → 19.1.2

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 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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 11 Apr 2025 15:34:45 GMT
11
+ * Last updated: Mon, 14 Apr 2025 19:02:17 GMT
12
12
  * Dependencies: [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/experimental.d.ts CHANGED
@@ -229,4 +229,13 @@ declare module "." {
229
229
 
230
230
  /** */
231
231
  export const unstable_Activity: ExoticComponent<ActivityProps>;
232
+
233
+ // @enableSrcObject
234
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
235
+ srcObject: Blob;
236
+ }
237
+
238
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
239
+ srcObject: Blob | MediaSource | MediaStream;
240
+ }
232
241
  }
react/global.d.ts CHANGED
@@ -158,3 +158,7 @@ interface WebGLRenderingContext {}
158
158
  interface WebGL2RenderingContext {}
159
159
 
160
160
  interface TrustedHTML {}
161
+
162
+ interface Blob {}
163
+ interface MediaStream {}
164
+ interface MediaSource {}
react/index.d.ts CHANGED
@@ -3060,6 +3060,8 @@ declare namespace React {
3060
3060
  width?: number | string | undefined;
3061
3061
  }
3062
3062
 
3063
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {}
3064
+
3063
3065
  interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
3064
3066
  alt?: string | undefined;
3065
3067
  crossOrigin?: CrossOrigin;
@@ -3069,7 +3071,12 @@ declare namespace React {
3069
3071
  loading?: "eager" | "lazy" | undefined;
3070
3072
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3071
3073
  sizes?: string | undefined;
3072
- src?: string | undefined;
3074
+ src?:
3075
+ | string
3076
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES[
3077
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES
3078
+ ]
3079
+ | undefined;
3073
3080
  srcSet?: string | undefined;
3074
3081
  useMap?: string | undefined;
3075
3082
  width?: number | string | undefined;
@@ -3253,6 +3260,8 @@ declare namespace React {
3253
3260
  type?: string | undefined;
3254
3261
  }
3255
3262
 
3263
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {}
3264
+
3256
3265
  interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
3257
3266
  autoPlay?: boolean | undefined;
3258
3267
  controls?: boolean | undefined;
@@ -3263,7 +3272,12 @@ declare namespace React {
3263
3272
  muted?: boolean | undefined;
3264
3273
  playsInline?: boolean | undefined;
3265
3274
  preload?: string | undefined;
3266
- src?: string | undefined;
3275
+ src?:
3276
+ | string
3277
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES[
3278
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES
3279
+ ]
3280
+ | undefined;
3267
3281
  }
3268
3282
 
3269
3283
  interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "19.1.1",
3
+ "version": "19.1.2",
4
4
  "description": "TypeScript definitions for react",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -205,6 +205,6 @@
205
205
  "csstype": "^3.0.2"
206
206
  },
207
207
  "peerDependencies": {},
208
- "typesPublisherContentHash": "c26a2243260136cf2f603397b7d6123ad019dfeba3c35c2546d2e1603afcb385",
208
+ "typesPublisherContentHash": "60861a737ca2cfa2a641beec7b7939c5c1d6fe7e4979513bb35a34c6e13a0056",
209
209
  "typeScriptVersion": "5.1"
210
210
  }
@@ -229,4 +229,13 @@ declare module "." {
229
229
 
230
230
  /** */
231
231
  export const unstable_Activity: ExoticComponent<ActivityProps>;
232
+
233
+ // @enableSrcObject
234
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
235
+ srcObject: Blob;
236
+ }
237
+
238
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
239
+ srcObject: Blob | MediaSource | MediaStream;
240
+ }
232
241
  }
react/ts5.0/global.d.ts CHANGED
@@ -158,3 +158,7 @@ interface WebGLRenderingContext {}
158
158
  interface WebGL2RenderingContext {}
159
159
 
160
160
  interface TrustedHTML {}
161
+
162
+ interface Blob {}
163
+ interface MediaStream {}
164
+ interface MediaSource {}
react/ts5.0/index.d.ts CHANGED
@@ -3059,6 +3059,8 @@ declare namespace React {
3059
3059
  width?: number | string | undefined;
3060
3060
  }
3061
3061
 
3062
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {}
3063
+
3062
3064
  interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
3063
3065
  alt?: string | undefined;
3064
3066
  crossOrigin?: CrossOrigin;
@@ -3068,7 +3070,12 @@ declare namespace React {
3068
3070
  loading?: "eager" | "lazy" | undefined;
3069
3071
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
3070
3072
  sizes?: string | undefined;
3071
- src?: string | undefined;
3073
+ src?:
3074
+ | string
3075
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES[
3076
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES
3077
+ ]
3078
+ | undefined;
3072
3079
  srcSet?: string | undefined;
3073
3080
  useMap?: string | undefined;
3074
3081
  width?: number | string | undefined;
@@ -3252,6 +3259,8 @@ declare namespace React {
3252
3259
  type?: string | undefined;
3253
3260
  }
3254
3261
 
3262
+ interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {}
3263
+
3255
3264
  interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
3256
3265
  autoPlay?: boolean | undefined;
3257
3266
  controls?: boolean | undefined;
@@ -3262,7 +3271,12 @@ declare namespace React {
3262
3271
  muted?: boolean | undefined;
3263
3272
  playsInline?: boolean | undefined;
3264
3273
  preload?: string | undefined;
3265
- src?: string | undefined;
3274
+ src?:
3275
+ | string
3276
+ | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES[
3277
+ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES
3278
+ ]
3279
+ | undefined;
3266
3280
  }
3267
3281
 
3268
3282
  interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {