@types/react 18.3.21 → 18.3.23

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 v18.3/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/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 06 May 2025 02:14:23 GMT
11
+ * Last updated: Tue, 27 May 2025 08:02:50 GMT
12
12
  * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react v18.3/global.d.ts CHANGED
@@ -13,6 +13,7 @@ interface ClipboardEvent extends Event {}
13
13
  interface CompositionEvent extends Event {}
14
14
  interface DragEvent extends Event {}
15
15
  interface FocusEvent extends Event {}
16
+ interface InputEvent extends Event {}
16
17
  interface KeyboardEvent extends Event {}
17
18
  interface MouseEvent extends Event {}
18
19
  interface TouchEvent extends Event {}
react v18.3/index.d.ts CHANGED
@@ -12,6 +12,7 @@ type NativeClipboardEvent = ClipboardEvent;
12
12
  type NativeCompositionEvent = CompositionEvent;
13
13
  type NativeDragEvent = DragEvent;
14
14
  type NativeFocusEvent = FocusEvent;
15
+ type NativeInputEvent = InputEvent;
15
16
  type NativeKeyboardEvent = KeyboardEvent;
16
17
  type NativeMouseEvent = MouseEvent;
17
18
  type NativeTouchEvent = TouchEvent;
@@ -2249,6 +2250,10 @@ declare namespace React {
2249
2250
  target: EventTarget & T;
2250
2251
  }
2251
2252
 
2253
+ interface InputEvent<T = Element> extends SyntheticEvent<T, NativeInputEvent> {
2254
+ data: string;
2255
+ }
2256
+
2252
2257
  export type ModifierKey =
2253
2258
  | "Alt"
2254
2259
  | "AltGraph"
@@ -2364,6 +2369,7 @@ declare namespace React {
2364
2369
  type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
2365
2370
  type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
2366
2371
  type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
2372
+ type InputEventHandler<T = Element> = EventHandler<InputEvent<T>>;
2367
2373
  type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
2368
2374
  type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
2369
2375
  type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
@@ -2421,7 +2427,7 @@ declare namespace React {
2421
2427
  // Form Events
2422
2428
  onChange?: FormEventHandler<T> | undefined;
2423
2429
  onChangeCapture?: FormEventHandler<T> | undefined;
2424
- onBeforeInput?: FormEventHandler<T> | undefined;
2430
+ onBeforeInput?: InputEventHandler<T> | undefined;
2425
2431
  onBeforeInputCapture?: FormEventHandler<T> | undefined;
2426
2432
  onInput?: FormEventHandler<T> | undefined;
2427
2433
  onInputCapture?: FormEventHandler<T> | undefined;
@@ -3427,6 +3433,7 @@ declare namespace React {
3427
3433
 
3428
3434
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
3429
3435
  as?: string | undefined;
3436
+ blocking?: "render" | (string & {}) | undefined;
3430
3437
  crossOrigin?: CrossOrigin;
3431
3438
  fetchPriority?: "high" | "low" | "auto";
3432
3439
  href?: string | undefined;
@@ -3536,6 +3543,7 @@ declare namespace React {
3536
3543
 
3537
3544
  interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
3538
3545
  async?: boolean | undefined;
3546
+ blocking?: "render" | (string & {}) | undefined;
3539
3547
  /** @deprecated */
3540
3548
  charSet?: string | undefined;
3541
3549
  crossOrigin?: CrossOrigin;
@@ -3570,6 +3578,7 @@ declare namespace React {
3570
3578
  }
3571
3579
 
3572
3580
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
3581
+ blocking?: "render" | (string & {}) | undefined;
3573
3582
  media?: string | undefined;
3574
3583
  scoped?: boolean | undefined;
3575
3584
  type?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.3.21",
3
+ "version": "18.3.23",
4
4
  "description": "TypeScript definitions for react",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -201,6 +201,6 @@
201
201
  "csstype": "^3.0.2"
202
202
  },
203
203
  "peerDependencies": {},
204
- "typesPublisherContentHash": "abc7c073b79f997cbd79ea7bf4b6924299afa06bd0fa3dae35d0b82fa70fc91d",
204
+ "typesPublisherContentHash": "f611668df87afe76cee4f7de955dacbad19f2a0500c824bf57e8337a4591e0d2",
205
205
  "typeScriptVersion": "5.1"
206
206
  }
@@ -13,6 +13,7 @@ interface ClipboardEvent extends Event {}
13
13
  interface CompositionEvent extends Event {}
14
14
  interface DragEvent extends Event {}
15
15
  interface FocusEvent extends Event {}
16
+ interface InputEvent extends Event {}
16
17
  interface KeyboardEvent extends Event {}
17
18
  interface MouseEvent extends Event {}
18
19
  interface TouchEvent extends Event {}
@@ -12,6 +12,7 @@ type NativeClipboardEvent = ClipboardEvent;
12
12
  type NativeCompositionEvent = CompositionEvent;
13
13
  type NativeDragEvent = DragEvent;
14
14
  type NativeFocusEvent = FocusEvent;
15
+ type NativeInputEvent = InputEvent;
15
16
  type NativeKeyboardEvent = KeyboardEvent;
16
17
  type NativeMouseEvent = MouseEvent;
17
18
  type NativeTouchEvent = TouchEvent;
@@ -2250,6 +2251,10 @@ declare namespace React {
2250
2251
  target: EventTarget & T;
2251
2252
  }
2252
2253
 
2254
+ interface InputEvent<T = Element> extends SyntheticEvent<T, NativeInputEvent> {
2255
+ data: string;
2256
+ }
2257
+
2253
2258
  export type ModifierKey =
2254
2259
  | "Alt"
2255
2260
  | "AltGraph"
@@ -2365,6 +2370,7 @@ declare namespace React {
2365
2370
  type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
2366
2371
  type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
2367
2372
  type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
2373
+ type InputEventHandler<T = Element> = EventHandler<InputEvent<T>>;
2368
2374
  type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
2369
2375
  type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
2370
2376
  type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
@@ -2422,7 +2428,7 @@ declare namespace React {
2422
2428
  // Form Events
2423
2429
  onChange?: FormEventHandler<T> | undefined;
2424
2430
  onChangeCapture?: FormEventHandler<T> | undefined;
2425
- onBeforeInput?: FormEventHandler<T> | undefined;
2431
+ onBeforeInput?: InputEventHandler<T> | undefined;
2426
2432
  onBeforeInputCapture?: FormEventHandler<T> | undefined;
2427
2433
  onInput?: FormEventHandler<T> | undefined;
2428
2434
  onInputCapture?: FormEventHandler<T> | undefined;
@@ -3428,6 +3434,7 @@ declare namespace React {
3428
3434
 
3429
3435
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
3430
3436
  as?: string | undefined;
3437
+ blocking?: "render" | (string & {}) | undefined;
3431
3438
  crossOrigin?: CrossOrigin;
3432
3439
  fetchPriority?: "high" | "low" | "auto";
3433
3440
  href?: string | undefined;
@@ -3537,6 +3544,7 @@ declare namespace React {
3537
3544
 
3538
3545
  interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
3539
3546
  async?: boolean | undefined;
3547
+ blocking?: "render" | (string & {}) | undefined;
3540
3548
  /** @deprecated */
3541
3549
  charSet?: string | undefined;
3542
3550
  crossOrigin?: CrossOrigin;
@@ -3571,6 +3579,7 @@ declare namespace React {
3571
3579
  }
3572
3580
 
3573
3581
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
3582
+ blocking?: "render" | (string & {}) | undefined;
3574
3583
  media?: string | undefined;
3575
3584
  scoped?: boolean | undefined;
3576
3585
  type?: string | undefined;