@types/react-dom 18.2.11 → 18.2.12

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-dom/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (react-dom) (https://reactjs.or
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 06 Oct 2023 23:05:45 GMT
11
+ * Last updated: Mon, 09 Oct 2023 17:06:13 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMServer`
14
14
 
react-dom/canary.d.ts CHANGED
@@ -31,6 +31,8 @@ import ReactDOM = require(".");
31
31
 
32
32
  export {};
33
33
 
34
+ declare const REACT_FORM_STATE_SIGIL: unique symbol;
35
+
34
36
  declare module "." {
35
37
  function prefetchDNS(href: string): void;
36
38
 
@@ -106,4 +108,43 @@ declare module "." {
106
108
  nonce?: string | undefined;
107
109
  }
108
110
  function preinitModule(href: string, options?: PreinitModuleOptions): void;
111
+
112
+ interface FormStatusNotPending {
113
+ pending: false;
114
+ data: null;
115
+ method: null;
116
+ action: null;
117
+ }
118
+
119
+ interface FormStatusPending {
120
+ pending: true;
121
+ data: FormData;
122
+ method: string;
123
+ action: string | ((formData: FormData) => void | Promise<void>);
124
+ }
125
+
126
+ type FormStatus = FormStatusPending | FormStatusNotPending;
127
+
128
+ function useFormStatus(): FormStatus;
129
+
130
+ function useFormState<State>(
131
+ action: (state: State) => Promise<State>,
132
+ initialState: State,
133
+ permalink?: string,
134
+ ): [state: State, dispatch: () => void];
135
+ function useFormState<State, Payload>(
136
+ action: (state: State, payload: Payload) => Promise<State>,
137
+ initialState: State,
138
+ permalink?: string,
139
+ ): [state: State, dispatch: (payload: Payload) => void];
140
+ }
141
+
142
+ declare module "./client" {
143
+ interface ReactFormState {
144
+ [REACT_FORM_STATE_SIGIL]: never;
145
+ }
146
+
147
+ interface HydrationOptions {
148
+ formState?: ReactFormState | null;
149
+ }
109
150
  }
@@ -32,45 +32,5 @@ import ReactDOM = require("./canary");
32
32
 
33
33
  export {};
34
34
 
35
- declare const REACT_FORM_STATE_SIGIL: unique symbol;
36
-
37
35
  declare module "." {
38
- interface FormStatusNotPending {
39
- pending: false;
40
- data: null;
41
- method: null;
42
- action: null;
43
- }
44
-
45
- interface FormStatusPending {
46
- pending: true;
47
- data: FormData;
48
- method: string;
49
- action: string | ((formData: FormData) => void | Promise<void>);
50
- }
51
-
52
- type FormStatus = FormStatusPending | FormStatusNotPending;
53
-
54
- function experimental_useFormStatus(): FormStatus;
55
-
56
- function experimental_useFormState<State>(
57
- action: (state: State) => Promise<State>,
58
- initialState: State,
59
- permalink?: string,
60
- ): [state: State, dispatch: () => void];
61
- function experimental_useFormState<State, Payload>(
62
- action: (state: State, payload: Payload) => Promise<State>,
63
- initialState: State,
64
- permalink?: string,
65
- ): [state: State, dispatch: (payload: Payload) => void];
66
- }
67
-
68
- declare module "./client" {
69
- interface ReactFormState {
70
- [REACT_FORM_STATE_SIGIL]: never;
71
- }
72
-
73
- interface HydrationOptions {
74
- experimental_formState?: ReactFormState | null;
75
- }
76
36
  }
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "18.2.11",
3
+ "version": "18.2.12",
4
4
  "description": "TypeScript definitions for React (react-dom)",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "@types/react": "*"
51
51
  },
52
- "typesPublisherContentHash": "db6cb2d465dc7cdd50f519c9905019bde94d32e9e38a2bbc509160297db14ba4",
52
+ "typesPublisherContentHash": "83c26d478a966b299f6c563280f5f028fc0c54b764d16e33ba2b0bcf24fb7145",
53
53
  "typeScriptVersion": "4.5",
54
54
  "exports": {
55
55
  ".": {