@types/react-dom
Advanced tools
Comparing version 18.2.11 to 18.2.13
@@ -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.13", | ||
"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": "9493aa01c7194270c928c9c5389b1724b9206c2ae267d9eb5e82551f54d9ba25", | ||
"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: Tue, 10 Oct 2023 18:07:33 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