@types/react-dom
Advanced tools
Comparing version 18.2.8 to 18.2.11
@@ -35,14 +35,58 @@ /** | ||
declare module "." { | ||
type PreloadAs = "font" | "script" | "style"; | ||
function prefetchDNS(href: string): void; | ||
interface PreconnectOptions { | ||
// Don't create a helper type. | ||
// It would have to be in module scope to be inlined in TS tooltips. | ||
// But then it becomes part of the public API. | ||
// TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref | ||
// since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
} | ||
function preconnect(href: string, options?: PreconnectOptions): void; | ||
type PreloadAs = | ||
| "audio" | ||
| "document" | ||
| "embed" | ||
| "fetch" | ||
| "font" | ||
| "image" | ||
| "object" | ||
| "track" | ||
| "script" | ||
| "style" | ||
| "video" | ||
| "worker"; | ||
interface PreloadOptions { | ||
as: PreloadAs; | ||
crossOrigin?: string | undefined; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
fetchPriority?: "high" | "low" | "auto" | undefined; | ||
// TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix. | ||
imageSizes?: string | undefined; | ||
imageSrcSet?: string | undefined; | ||
integrity?: string | undefined; | ||
nonce?: string | undefined; | ||
referrerPolicy?: ReferrerPolicy | undefined; | ||
} | ||
function preload(href: string, options?: PreloadOptions): void; | ||
// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload | ||
type PreloadModuleAs = RequestDestination; | ||
interface PreloadModuleOptions { | ||
/** | ||
* @default "script" | ||
*/ | ||
as: PreloadModuleAs; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
integrity?: string | undefined; | ||
nonce?: string | undefined; | ||
} | ||
function preloadModule(href: string, options?: PreloadModuleOptions): void; | ||
type PreinitAs = "script" | "style"; | ||
interface PreinitOptions { | ||
as: PreinitAs; | ||
crossOrigin?: string | undefined; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
fetchPriority?: "high" | "low" | "auto" | undefined; | ||
precedence?: string | undefined; | ||
@@ -53,2 +97,15 @@ integrity?: string | undefined; | ||
function preinit(href: string, options?: PreinitOptions): void; | ||
// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes | ||
type PreinitModuleAs = "script"; | ||
interface PreinitModuleOptions { | ||
/** | ||
* @default "script" | ||
*/ | ||
as?: PreinitModuleAs; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
integrity?: string | undefined; | ||
nonce?: string | undefined; | ||
} | ||
function preinitModule(href: string, options?: PreinitModuleOptions): void; | ||
} |
@@ -35,2 +35,4 @@ /** | ||
declare const REACT_FORM_STATE_SIGIL: unique symbol; | ||
declare module "." { | ||
@@ -54,2 +56,23 @@ interface 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.8", | ||
"version": "18.2.11", | ||
"description": "TypeScript definitions for React (react-dom)", | ||
@@ -52,3 +52,3 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
}, | ||
"typesPublisherContentHash": "f37f361aad53e3f7a39972574a1b1cab2abe083c8bf24b0529d11877c5e0f940", | ||
"typesPublisherContentHash": "db6cb2d465dc7cdd50f519c9905019bde94d32e9e38a2bbc509160297db14ba4", | ||
"typeScriptVersion": "4.5", | ||
@@ -55,0 +55,0 @@ "exports": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT | ||
* Last updated: Fri, 06 Oct 2023 23:05:45 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
33426
769