@types/react-dom
Advanced tools
| /** | ||
| * These are types for things that are present in the upcoming React 18 release. | ||
| * | ||
| * Once React 18 is released they can just be moved to the main index file. | ||
| * | ||
| * To load the types declared here in an actual project, there are three ways. The easiest one, | ||
| * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, | ||
| * is to add `"react-dom/canary"` to the `"types"` array. | ||
| * | ||
| * Alternatively, a specific import syntax can to be used from a typescript file. | ||
| * This module does not exist in reality, which is why the {} is important: | ||
| * | ||
| * ```ts | ||
| * import {} from 'react-dom/canary' | ||
| * ``` | ||
| * | ||
| * It is also possible to include it through a triple-slash reference: | ||
| * | ||
| * ```ts | ||
| * /// <reference types="react-dom/canary" /> | ||
| * ``` | ||
| * | ||
| * Either the import or the reference only needs to appear once, anywhere in the project. | ||
| */ | ||
| // See https://github.com/facebook/react/blob/main/packages/react-dom/index.js to see how the exports are declared, | ||
| // but confirm with published source code (e.g. https://unpkg.com/react-dom@canary) that these exports end up in the published code | ||
| import React = require('react'); | ||
| import ReactDOM = require('.'); | ||
| export {}; | ||
| declare module '.' { | ||
| type PreloadAs = 'font' | 'script' | 'style'; | ||
| interface PreloadOptions { | ||
| as: PreloadAs; | ||
| crossOrigin?: string | undefined; | ||
| integrity?: string | undefined; | ||
| } | ||
| function preload(href: string, options?: PreloadOptions): void; | ||
| type PreinitAs = 'script' | 'style'; | ||
| interface PreinitOptions { | ||
| as: PreinitAs; | ||
| crossOrigin?: string | undefined; | ||
| precedence?: string | undefined; | ||
| integrity?: string | undefined; | ||
| nonce?: string | undefined; | ||
| } | ||
| function preinit(href: string, options?: PreinitOptions): void; | ||
| } |
@@ -13,3 +13,3 @@ /** | ||
| identifierPrefix?: string; | ||
| onRecoverableError?: (error: unknown) => void; | ||
| onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; | ||
| } | ||
@@ -22,5 +22,10 @@ | ||
| identifierPrefix?: string; | ||
| onRecoverableError?: (error: unknown) => void; | ||
| onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; | ||
| } | ||
| export interface ErrorInfo { | ||
| digest?: string; | ||
| componentStack?: string; | ||
| } | ||
| export interface Root { | ||
@@ -27,0 +32,0 @@ render(children: React.ReactNode): void; |
@@ -31,6 +31,24 @@ /** | ||
| import React = require('react'); | ||
| import ReactDOM = require('./next'); | ||
| import ReactDOM = require('./canary'); | ||
| export {}; | ||
| declare module '.' {} | ||
| 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,2 +0,2 @@ | ||
| // Type definitions for React (react-dom) 18.0 | ||
| // Type definitions for React (react-dom) 18.2 | ||
| // Project: https://reactjs.org | ||
@@ -37,5 +37,4 @@ // Definitions by: Asana <https://asana.com> | ||
| export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void; | ||
| export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void; | ||
| export function unstable_batchedUpdates(callback: () => any): void; | ||
| export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R; | ||
| export function unstable_batchedUpdates<R>(callback: () => R): R; | ||
@@ -42,0 +41,0 @@ export function unstable_renderSubtreeIntoContainer<T extends Element>( |
| { | ||
| "name": "@types/react-dom", | ||
| "version": "18.0.10", | ||
| "version": "18.2.7", | ||
| "description": "TypeScript definitions for React (react-dom)", | ||
@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
| }, | ||
| "typesPublisherContentHash": "5423ad1f388a78bf72f9d4995aa595d3ca66f1750f4fcb24868ba98d3c06e615", | ||
| "typeScriptVersion": "4.2", | ||
| "typesPublisherContentHash": "726a49383efba462b3ec2c83e7628b88070ea64986c3f1b2de67241452512b5a", | ||
| "typeScriptVersion": "4.3", | ||
| "exports": { | ||
@@ -66,5 +66,5 @@ ".": { | ||
| }, | ||
| "./next": { | ||
| "./canary": { | ||
| "types": { | ||
| "default": "./next.d.ts" | ||
| "default": "./canary.d.ts" | ||
| } | ||
@@ -71,0 +71,0 @@ }, |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Fri, 23 Dec 2022 11:32:40 GMT | ||
| * Last updated: Wed, 12 Jul 2023 19:02:46 GMT | ||
| * Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: `ReactDOM`, `ReactDOMServer` |
@@ -25,2 +25,3 @@ // forward declarations | ||
| import { ReactElement, ReactNode } from 'react'; | ||
| import { ErrorInfo } from './client'; | ||
@@ -38,8 +39,8 @@ export interface RenderToPipeableStreamOptions { | ||
| onAllReady?: () => void; | ||
| onError?: (error: unknown) => void; | ||
| onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; | ||
| } | ||
| export interface PipeableStream { | ||
| abort(): void; | ||
| pipe<Writable extends NodeJS.WritableStream>(destination: Writable): Writable; | ||
| abort: (reason?: unknown) => void; | ||
| pipe: <Writable extends NodeJS.WritableStream>(destination: Writable) => Writable; | ||
| } | ||
@@ -102,3 +103,3 @@ | ||
| signal?: AbortSignal; | ||
| onError?: (error: unknown) => void; | ||
| onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; | ||
| } | ||
@@ -105,0 +106,0 @@ |
@@ -85,3 +85,3 @@ import { | ||
| */ | ||
| export namespace Simulate { | ||
| export namespace Simulate { | ||
| const abort: EventSimulator; | ||
@@ -92,2 +92,3 @@ const animationEnd: EventSimulator; | ||
| const blur: EventSimulator; | ||
| const cancel: EventSimulator; | ||
| const canPlay: EventSimulator; | ||
@@ -97,2 +98,3 @@ const canPlayThrough: EventSimulator; | ||
| const click: EventSimulator; | ||
| const close: EventSimulator; | ||
| const compositionEnd: EventSimulator; | ||
@@ -104,2 +106,3 @@ const compositionStart: EventSimulator; | ||
| const cut: EventSimulator; | ||
| const auxClick: EventSimulator; | ||
| const doubleClick: EventSimulator; | ||
@@ -141,7 +144,21 @@ const drag: EventSimulator; | ||
| const progress: EventSimulator; | ||
| const pointerCancel: EventSimulator; | ||
| const pointerDown: EventSimulator; | ||
| const pointerUp: EventSimulator; | ||
| const pointerMove: EventSimulator; | ||
| const pointerOut: EventSimulator; | ||
| const pointerOver: EventSimulator; | ||
| const pointerEnter: EventSimulator; | ||
| const pointerLeave: EventSimulator; | ||
| const gotPointerCapture: EventSimulator; | ||
| const lostPointerCapture: EventSimulator; | ||
| const rateChange: EventSimulator; | ||
| const reset: EventSimulator; | ||
| const resize: EventSimulator; | ||
| const scroll: EventSimulator; | ||
| const toggle: EventSimulator; | ||
| const seeked: EventSimulator; | ||
| const seeking: EventSimulator; | ||
| const select: EventSimulator; | ||
| const beforeInput: EventSimulator; | ||
| const stalled: EventSimulator; | ||
@@ -148,0 +165,0 @@ const submit: EventSimulator; |
| /** | ||
| * These are types for things that are present in the upcoming React 18 release. | ||
| * | ||
| * Once React 18 is released they can just be moved to the main index file. | ||
| * | ||
| * To load the types declared here in an actual project, there are three ways. The easiest one, | ||
| * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, | ||
| * is to add `"react-dom/next"` to the `"types"` array. | ||
| * | ||
| * Alternatively, a specific import syntax can to be used from a typescript file. | ||
| * This module does not exist in reality, which is why the {} is important: | ||
| * | ||
| * ```ts | ||
| * import {} from 'react-dom/next' | ||
| * ``` | ||
| * | ||
| * It is also possible to include it through a triple-slash reference: | ||
| * | ||
| * ```ts | ||
| * /// <reference types="react-dom/next" /> | ||
| * ``` | ||
| * | ||
| * Either the import or the reference only needs to appear once, anywhere in the project. | ||
| */ | ||
| // See https://github.com/facebook/react/blob/main/packages/react-dom/index.js to see how the exports are declared, | ||
| // but confirm with published source code (e.g. https://unpkg.com/react-dom@next) that these exports end up in the published code | ||
| import React = require('react'); | ||
| import ReactDOM = require('.'); | ||
| export {}; | ||
| declare module '.' { | ||
| type PreloadAs = 'font' | 'script' | 'style'; | ||
| interface PreloadOptions { | ||
| as: PreloadAs; | ||
| crossOrigin?: string | undefined; | ||
| integrity?: string | undefined; | ||
| } | ||
| function preload(href: string, options?: PreloadOptions): void; | ||
| type PreinitAs = 'script' | 'style'; | ||
| interface PreinitOptions { | ||
| as: PreinitAs; | ||
| crossOrigin?: string | undefined; | ||
| precedence?: string | undefined; | ||
| integrity?: string | undefined; | ||
| } | ||
| function preinit(href: string, options?: PreinitOptions): void; | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
30229
4.44%638
6.16%