Socket
Socket
Sign inDemoInstall

@types/react-dom

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-dom - npm Package Compare versions

Comparing version 18.2.8 to 18.2.14

104

react-dom/canary.d.ts

@@ -34,15 +34,61 @@ /**

declare const REACT_FORM_STATE_SIGIL: unique symbol;
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 +99,54 @@ 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;
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;
}
}

17

react-dom/experimental.d.ts

@@ -36,19 +36,2 @@ /**

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;
}

@@ -1,13 +0,1 @@

// Type definitions for React (react-dom) 18.2
// Project: https://reactjs.org
// Definitions by: Asana <https://asana.com>
// AssureSign <http://www.assuresign.com>
// Microsoft <https://microsoft.com>
// MartynasZilinskas <https://github.com/MartynasZilinskas>
// Josh Rutherford <https://github.com/theruther4d>
// Jessica Franco <https://github.com/Jessidhia>
// Sebastian Silbermann <https://github.com/eps1lon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
// NOTE: Users of the `experimental` builds of React should add a reference

@@ -14,0 +2,0 @@ // to 'react-dom/experimental' in their project. See experimental.d.ts's top comment

{
"name": "@types/react-dom",
"version": "18.2.8",
"description": "TypeScript definitions for React (react-dom)",
"version": "18.2.14",
"description": "TypeScript definitions for react-dom",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",

@@ -22,19 +22,19 @@ "license": "MIT",

"name": "MartynasZilinskas",
"url": "https://github.com/MartynasZilinskas",
"githubUsername": "MartynasZilinskas"
"githubUsername": "MartynasZilinskas",
"url": "https://github.com/MartynasZilinskas"
},
{
"name": "Josh Rutherford",
"url": "https://github.com/theruther4d",
"githubUsername": "theruther4d"
"githubUsername": "theruther4d",
"url": "https://github.com/theruther4d"
},
{
"name": "Jessica Franco",
"url": "https://github.com/Jessidhia",
"githubUsername": "Jessidhia"
"githubUsername": "Jessidhia",
"url": "https://github.com/Jessidhia"
},
{
"name": "Sebastian Silbermann",
"url": "https://github.com/eps1lon",
"githubUsername": "eps1lon"
"githubUsername": "eps1lon",
"url": "https://github.com/eps1lon"
}

@@ -44,13 +44,2 @@ ],

"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/react-dom"
},
"scripts": {},
"dependencies": {
"@types/react": "*"
},
"typesPublisherContentHash": "f37f361aad53e3f7a39972574a1b1cab2abe083c8bf24b0529d11877c5e0f940",
"typeScriptVersion": "4.5",
"exports": {

@@ -88,3 +77,14 @@ ".": {

"./package.json": "./package.json"
}
},
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/react-dom"
},
"scripts": {},
"dependencies": {
"@types/react": "*"
},
"typesPublisherContentHash": "a91527c44aa825000d86a4ee5471f4cfc93028a45d97c624bca8ba664455d44e",
"typeScriptVersion": "4.5"
}

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for React (react-dom) (https://reactjs.org).
This package contains type definitions for react-dom (https://reactjs.org).

@@ -12,7 +12,6 @@ # Details

### Additional Details
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT
* Last updated: Wed, 18 Oct 2023 18:04:04 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
* Global values: `ReactDOM`, `ReactDOMServer`
# Credits
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc