@types/react-dom
Advanced tools
Comparing version 18.2.11 to 18.2.12
@@ -34,2 +34,4 @@ /** | ||
declare const REACT_FORM_STATE_SIGIL: unique symbol; | ||
declare module "." { | ||
@@ -110,2 +112,41 @@ function prefetchDNS(href: string): void; | ||
function preinitModule(href: string, options?: PreinitModuleOptions): void; | ||
interface FormStatusNotPending { | ||
pending: false; | ||
data: null; | ||
method: null; | ||
action: null; | ||
} | ||
interface FormStatusPending { | ||
pending: true; | ||
data: FormData; | ||
method: string; | ||
action: string | ((formData: FormData) => void | Promise<void>); | ||
} | ||
type FormStatus = FormStatusPending | FormStatusNotPending; | ||
function useFormStatus(): FormStatus; | ||
function useFormState<State>( | ||
action: (state: State) => Promise<State>, | ||
initialState: State, | ||
permalink?: string, | ||
): [state: State, dispatch: () => void]; | ||
function useFormState<State, Payload>( | ||
action: (state: State, payload: Payload) => Promise<State>, | ||
initialState: State, | ||
permalink?: string, | ||
): [state: State, dispatch: (payload: Payload) => void]; | ||
} | ||
declare module "./client" { | ||
interface ReactFormState { | ||
[REACT_FORM_STATE_SIGIL]: never; | ||
} | ||
interface HydrationOptions { | ||
formState?: ReactFormState | null; | ||
} | ||
} |
@@ -35,43 +35,3 @@ /** | ||
declare const REACT_FORM_STATE_SIGIL: unique symbol; | ||
declare module "." { | ||
interface FormStatusNotPending { | ||
pending: false; | ||
data: null; | ||
method: null; | ||
action: null; | ||
} | ||
interface FormStatusPending { | ||
pending: true; | ||
data: FormData; | ||
method: string; | ||
action: string | ((formData: FormData) => void | Promise<void>); | ||
} | ||
type FormStatus = FormStatusPending | FormStatusNotPending; | ||
function experimental_useFormStatus(): FormStatus; | ||
function experimental_useFormState<State>( | ||
action: (state: State) => Promise<State>, | ||
initialState: State, | ||
permalink?: string, | ||
): [state: State, dispatch: () => void]; | ||
function experimental_useFormState<State, Payload>( | ||
action: (state: State, payload: Payload) => Promise<State>, | ||
initialState: State, | ||
permalink?: string, | ||
): [state: State, dispatch: (payload: Payload) => void]; | ||
} | ||
declare module "./client" { | ||
interface ReactFormState { | ||
[REACT_FORM_STATE_SIGIL]: never; | ||
} | ||
interface HydrationOptions { | ||
experimental_formState?: ReactFormState | null; | ||
} | ||
} |
{ | ||
"name": "@types/react-dom", | ||
"version": "18.2.11", | ||
"version": "18.2.12", | ||
"description": "TypeScript definitions for React (react-dom)", | ||
@@ -52,3 +52,3 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
}, | ||
"typesPublisherContentHash": "db6cb2d465dc7cdd50f519c9905019bde94d32e9e38a2bbc509160297db14ba4", | ||
"typesPublisherContentHash": "83c26d478a966b299f6c563280f5f028fc0c54b764d16e33ba2b0bcf24fb7145", | ||
"typeScriptVersion": "4.5", | ||
@@ -55,0 +55,0 @@ "exports": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 06 Oct 2023 23:05:45 GMT | ||
* Last updated: Mon, 09 Oct 2023 17:06:13 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: `ReactDOM`, `ReactDOMServer` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33375