@types/react 19.0.7 → 19.0.9

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: Tue, 14 Jan 2025 09:02:32 GMT
11
+ * Last updated: Sun, 16 Feb 2025 12:44:21 GMT
12
12
  * Dependencies: [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/canary.d.ts CHANGED
@@ -32,4 +32,11 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
32
32
 
33
33
  declare module "." {
34
34
  export function unstable_useCacheRefresh(): () => void;
35
+
36
+ /**
37
+ * Warning: Only available in development builds.
38
+ *
39
+ * @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs}
40
+ */
41
+ function captureOwnerStack(): string | null;
35
42
  }
react/experimental.d.ts CHANGED
@@ -109,11 +109,6 @@ declare module "." {
109
109
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
110
110
  export function experimental_useEffectEvent<T extends Function>(event: T): T;
111
111
 
112
- /**
113
- * Warning: Only available in development builds.
114
- */
115
- function captureOwnerStack(): string | null;
116
-
117
112
  type Reference = object;
118
113
  type TaintableUniqueValue = string | bigint | ArrayBufferView;
119
114
  function experimental_taintUniqueValue(
react/index.d.ts CHANGED
@@ -1508,13 +1508,13 @@ declare namespace React {
1508
1508
  * @example
1509
1509
  *
1510
1510
  * ```tsx
1511
- * type MyComponentRef = React.ElementRef<typeof MyComponent>;
1511
+ * type MyComponentRef = React.ComponentRef<typeof MyComponent>;
1512
1512
  * ```
1513
1513
  *
1514
1514
  * @example
1515
1515
  *
1516
1516
  * ```tsx
1517
- * type DivRef = React.ElementRef<'div'>;
1517
+ * type DivRef = React.ComponentRef<'div'>;
1518
1518
  * ```
1519
1519
  */
1520
1520
  type ComponentRef<T extends ElementType> = ComponentPropsWithRef<T> extends RefAttributes<infer Method> ? Method
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "19.0.7",
3
+ "version": "19.0.9",
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": "95916085602513b1b9df08b2b73421062fc6293cbd04000ddec39d3917b25295",
208
+ "typesPublisherContentHash": "da61cd14a456db728da7a08fe8f1531a8fa359708106498f19f9321ef393e111",
209
209
  "typeScriptVersion": "5.0"
210
210
  }
react/ts5.0/canary.d.ts CHANGED
@@ -32,4 +32,11 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
32
32
 
33
33
  declare module "." {
34
34
  export function unstable_useCacheRefresh(): () => void;
35
+
36
+ /**
37
+ * Warning: Only available in development builds.
38
+ *
39
+ * @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs}
40
+ */
41
+ function captureOwnerStack(): string | null;
35
42
  }
@@ -109,11 +109,6 @@ declare module "." {
109
109
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
110
110
  export function experimental_useEffectEvent<T extends Function>(event: T): T;
111
111
 
112
- /**
113
- * Warning: Only available in development builds.
114
- */
115
- function captureOwnerStack(): string | null;
116
-
117
112
  type Reference = object;
118
113
  type TaintableUniqueValue = string | bigint | ArrayBufferView;
119
114
  function experimental_taintUniqueValue(
react/ts5.0/index.d.ts CHANGED
@@ -1507,13 +1507,13 @@ declare namespace React {
1507
1507
  * @example
1508
1508
  *
1509
1509
  * ```tsx
1510
- * type MyComponentRef = React.ElementRef<typeof MyComponent>;
1510
+ * type MyComponentRef = React.ComponentRef<typeof MyComponent>;
1511
1511
  * ```
1512
1512
  *
1513
1513
  * @example
1514
1514
  *
1515
1515
  * ```tsx
1516
- * type DivRef = React.ElementRef<'div'>;
1516
+ * type DivRef = React.ComponentRef<'div'>;
1517
1517
  * ```
1518
1518
  */
1519
1519
  type ComponentRef<T extends ElementType> = ComponentPropsWithRef<T> extends RefAttributes<infer Method> ? Method