@types/react 19.0.13 → 19.1.0
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 +1 -1
- react/canary.d.ts +0 -7
- react/experimental.d.ts +7 -0
- react/index.d.ts +12 -1
- react/package.json +2 -2
- react/ts5.0/canary.d.ts +0 -7
- react/ts5.0/experimental.d.ts +7 -0
- react/ts5.0/index.d.ts +12 -1
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: Wed, 02 Apr 2025
|
11
|
+
* Last updated: Wed, 02 Apr 2025 07:33:00 GMT
|
12
12
|
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
13
13
|
|
14
14
|
# Credits
|
react/canary.d.ts
CHANGED
@@ -32,11 +32,4 @@ 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;
|
42
35
|
}
|
react/experimental.d.ts
CHANGED
@@ -207,4 +207,11 @@ declare module "." {
|
|
207
207
|
scope: () => void,
|
208
208
|
options?: GestureOptions,
|
209
209
|
): () => void;
|
210
|
+
|
211
|
+
// @enableFragmentRefs
|
212
|
+
export interface FragmentInstance {}
|
213
|
+
|
214
|
+
export interface FragmentProps {
|
215
|
+
ref?: Ref<FragmentInstance> | undefined;
|
216
|
+
}
|
210
217
|
}
|
react/index.d.ts
CHANGED
@@ -721,6 +721,10 @@ declare namespace React {
|
|
721
721
|
only<C>(children: C): C extends any[] ? never : C;
|
722
722
|
toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
|
723
723
|
};
|
724
|
+
|
725
|
+
export interface FragmentProps {
|
726
|
+
children?: React.ReactNode;
|
727
|
+
}
|
724
728
|
/**
|
725
729
|
* Lets you group elements without a wrapper node.
|
726
730
|
*
|
@@ -748,7 +752,7 @@ declare namespace React {
|
|
748
752
|
* </>
|
749
753
|
* ```
|
750
754
|
*/
|
751
|
-
const Fragment: ExoticComponent<
|
755
|
+
const Fragment: ExoticComponent<FragmentProps>;
|
752
756
|
|
753
757
|
/**
|
754
758
|
* Lets you find common bugs in your components early during development.
|
@@ -1934,6 +1938,13 @@ declare namespace React {
|
|
1934
1938
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
1935
1939
|
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
1936
1940
|
|
1941
|
+
/**
|
1942
|
+
* Warning: Only available in development builds.
|
1943
|
+
*
|
1944
|
+
* @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs}
|
1945
|
+
*/
|
1946
|
+
function captureOwnerStack(): string | null;
|
1947
|
+
|
1937
1948
|
//
|
1938
1949
|
// Event System
|
1939
1950
|
// ----------------------------------------------------------------------
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "19.0
|
3
|
+
"version": "19.1.0",
|
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": "
|
208
|
+
"typesPublisherContentHash": "045855bc6d5c9b02e38d720a00155e1b47f4bbcadcbbdaa2b3da3bd9ae7c88a3",
|
209
209
|
"typeScriptVersion": "5.1"
|
210
210
|
}
|
react/ts5.0/canary.d.ts
CHANGED
@@ -32,11 +32,4 @@ 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;
|
42
35
|
}
|
react/ts5.0/experimental.d.ts
CHANGED
@@ -207,4 +207,11 @@ declare module "." {
|
|
207
207
|
scope: () => void,
|
208
208
|
options?: GestureOptions,
|
209
209
|
): () => void;
|
210
|
+
|
211
|
+
// @enableFragmentRefs
|
212
|
+
export interface FragmentInstance {}
|
213
|
+
|
214
|
+
export interface FragmentProps {
|
215
|
+
ref?: Ref<FragmentInstance> | undefined;
|
216
|
+
}
|
210
217
|
}
|
react/ts5.0/index.d.ts
CHANGED
@@ -722,6 +722,10 @@ declare namespace React {
|
|
722
722
|
only<C>(children: C): C extends any[] ? never : C;
|
723
723
|
toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
|
724
724
|
};
|
725
|
+
|
726
|
+
export interface FragmentProps {
|
727
|
+
children?: React.ReactNode;
|
728
|
+
}
|
725
729
|
/**
|
726
730
|
* Lets you group elements without a wrapper node.
|
727
731
|
*
|
@@ -749,7 +753,7 @@ declare namespace React {
|
|
749
753
|
* </>
|
750
754
|
* ```
|
751
755
|
*/
|
752
|
-
const Fragment: ExoticComponent<
|
756
|
+
const Fragment: ExoticComponent<FragmentProps>;
|
753
757
|
|
754
758
|
/**
|
755
759
|
* Lets you find common bugs in your components early during development.
|
@@ -1933,6 +1937,13 @@ declare namespace React {
|
|
1933
1937
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
1934
1938
|
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
1935
1939
|
|
1940
|
+
/**
|
1941
|
+
* Warning: Only available in development builds.
|
1942
|
+
*
|
1943
|
+
* @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs}
|
1944
|
+
*/
|
1945
|
+
function captureOwnerStack(): string | null;
|
1946
|
+
|
1936
1947
|
//
|
1937
1948
|
// Event System
|
1938
1949
|
// ----------------------------------------------------------------------
|