@types/react 18.0.2 → 18.0.3
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/index.d.ts +13 -1
- 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: Tue, 12 Apr 2022
|
11
|
+
* Last updated: Tue, 12 Apr 2022 18:01:23 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
@@ -377,7 +377,15 @@ declare namespace React {
|
|
377
377
|
|
378
378
|
function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
|
379
379
|
|
380
|
-
|
380
|
+
// Sync with `ReactChildren` until `ReactChildren` is removed.
|
381
|
+
const Children: {
|
382
|
+
map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T):
|
383
|
+
C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
|
384
|
+
forEach<C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => void): void;
|
385
|
+
count(children: any): number;
|
386
|
+
only<C>(children: C): C extends any[] ? never : C;
|
387
|
+
toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
|
388
|
+
};
|
381
389
|
const Fragment: ExoticComponent<{ children?: ReactNode | undefined }>;
|
382
390
|
const StrictMode: ExoticComponent<{ children?: ReactNode | undefined }>;
|
383
391
|
|
@@ -2999,6 +3007,10 @@ declare namespace React {
|
|
2999
3007
|
// React.Children
|
3000
3008
|
// ----------------------------------------------------------------------
|
3001
3009
|
|
3010
|
+
/**
|
3011
|
+
* @deprecated - Use `typeof React.Children` instead.
|
3012
|
+
*/
|
3013
|
+
// Sync with type of `const Children`.
|
3002
3014
|
interface ReactChildren {
|
3003
3015
|
map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T):
|
3004
3016
|
C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.0.
|
3
|
+
"version": "18.0.3",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,7 +146,7 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
149
|
+
"typesPublisherContentHash": "bb5f8410b9a5449a22b356472225e567ada9c8dbc920851884420efa90b2e518",
|
150
150
|
"typeScriptVersion": "3.9",
|
151
151
|
"exports": {
|
152
152
|
".": {
|