@types/react 18.2.71 → 18.2.73
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 +2 -2
- react/canary.d.ts +13 -2
- react/package.json +2 -3
- react/ts5.0/canary.d.ts +13 -2
react/README.md
CHANGED
@@ -8,8 +8,8 @@ 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:
|
12
|
-
* Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [
|
11
|
+
* Last updated: Wed, 27 Mar 2024 16:37:53 GMT
|
12
|
+
* Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
|
13
13
|
|
14
14
|
# Credits
|
15
15
|
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Dale Tan](https://github.com/hellatan), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
|
react/canary.d.ts
CHANGED
@@ -102,10 +102,10 @@ declare module "." {
|
|
102
102
|
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
103
103
|
}
|
104
104
|
|
105
|
-
function useOptimistic<State>(
|
105
|
+
export function useOptimistic<State>(
|
106
106
|
passthrough: State,
|
107
107
|
): [State, (action: State | ((pendingState: State) => State)) => void];
|
108
|
-
function useOptimistic<State, Action>(
|
108
|
+
export function useOptimistic<State, Action>(
|
109
109
|
passthrough: State,
|
110
110
|
reducer: (state: State, action: Action) => State,
|
111
111
|
): [State, (action: Action) => void];
|
@@ -113,4 +113,15 @@ declare module "." {
|
|
113
113
|
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
114
114
|
cleanup: () => VoidOrUndefinedOnly;
|
115
115
|
}
|
116
|
+
|
117
|
+
export function useActionState<State>(
|
118
|
+
action: (state: Awaited<State>) => State | Promise<State>,
|
119
|
+
initialState: Awaited<State>,
|
120
|
+
permalink?: string,
|
121
|
+
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
122
|
+
export function useActionState<State, Payload>(
|
123
|
+
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
124
|
+
initialState: Awaited<State>,
|
125
|
+
permalink?: string,
|
126
|
+
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
116
127
|
}
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.2.
|
3
|
+
"version": "18.2.73",
|
4
4
|
"description": "TypeScript definitions for react",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -203,9 +203,8 @@
|
|
203
203
|
"scripts": {},
|
204
204
|
"dependencies": {
|
205
205
|
"@types/prop-types": "*",
|
206
|
-
"@types/scheduler": "*",
|
207
206
|
"csstype": "^3.0.2"
|
208
207
|
},
|
209
|
-
"typesPublisherContentHash": "
|
208
|
+
"typesPublisherContentHash": "9fb5bfea6e75766d22ab76ce27297701d372335892b8ce75ad990b3103e2155c",
|
210
209
|
"typeScriptVersion": "4.7"
|
211
210
|
}
|
react/ts5.0/canary.d.ts
CHANGED
@@ -102,10 +102,10 @@ declare module "." {
|
|
102
102
|
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
103
103
|
}
|
104
104
|
|
105
|
-
function useOptimistic<State>(
|
105
|
+
export function useOptimistic<State>(
|
106
106
|
passthrough: State,
|
107
107
|
): [State, (action: State | ((pendingState: State) => State)) => void];
|
108
|
-
function useOptimistic<State, Action>(
|
108
|
+
export function useOptimistic<State, Action>(
|
109
109
|
passthrough: State,
|
110
110
|
reducer: (state: State, action: Action) => State,
|
111
111
|
): [State, (action: Action) => void];
|
@@ -113,4 +113,15 @@ declare module "." {
|
|
113
113
|
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
114
114
|
cleanup: () => VoidOrUndefinedOnly;
|
115
115
|
}
|
116
|
+
|
117
|
+
export function useActionState<State>(
|
118
|
+
action: (state: Awaited<State>) => State | Promise<State>,
|
119
|
+
initialState: Awaited<State>,
|
120
|
+
permalink?: string,
|
121
|
+
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
122
|
+
export function useActionState<State, Payload>(
|
123
|
+
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
124
|
+
initialState: Awaited<State>,
|
125
|
+
permalink?: string,
|
126
|
+
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
116
127
|
}
|