@types/react-dom
Advanced tools
Comparing version 18.2.7 to 18.2.8
@@ -29,9 +29,9 @@ /** | ||
import React = require('react'); | ||
import ReactDOM = require('.'); | ||
import React = require("react"); | ||
import ReactDOM = require("."); | ||
export {}; | ||
declare module '.' { | ||
type PreloadAs = 'font' | 'script' | 'style'; | ||
declare module "." { | ||
type PreloadAs = "font" | "script" | "style"; | ||
interface PreloadOptions { | ||
@@ -44,3 +44,3 @@ as: PreloadAs; | ||
type PreinitAs = 'script' | 'style'; | ||
type PreinitAs = "script" | "style"; | ||
interface PreinitOptions { | ||
@@ -47,0 +47,0 @@ as: PreinitAs; |
@@ -7,3 +7,3 @@ /** | ||
import React = require('react'); | ||
import React = require("react"); | ||
export interface HydrationOptions { | ||
@@ -10,0 +10,0 @@ /** |
@@ -30,8 +30,8 @@ /** | ||
import React = require('react'); | ||
import ReactDOM = require('./canary'); | ||
import React = require("react"); | ||
import ReactDOM = require("./canary"); | ||
export {}; | ||
declare module '.' { | ||
declare module "." { | ||
interface FormStatusNotPending { | ||
@@ -38,0 +38,0 @@ pending: false; |
@@ -20,6 +20,13 @@ // Type definitions for React (react-dom) 18.2 | ||
import { | ||
ReactInstance, Component, ComponentState, | ||
ReactElement, FunctionComponentElement, CElement, | ||
DOMAttributes, DOMElement, ReactNode, ReactPortal | ||
} from 'react'; | ||
CElement, | ||
Component, | ||
ComponentState, | ||
DOMAttributes, | ||
DOMElement, | ||
FunctionComponentElement, | ||
ReactElement, | ||
ReactInstance, | ||
ReactNode, | ||
ReactPortal, | ||
} from "react"; | ||
@@ -29,3 +36,7 @@ export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text; | ||
export function createPortal(children: ReactNode, container: Element | DocumentFragment, key?: null | string): ReactPortal; | ||
export function createPortal( | ||
children: ReactNode, | ||
container: Element | DocumentFragment, | ||
key?: null | string, | ||
): ReactPortal; | ||
@@ -46,3 +57,4 @@ export const version: string; | ||
container: Element, | ||
callback?: (element: T) => any): T; | ||
callback?: (element: T) => any, | ||
): T; | ||
export function unstable_renderSubtreeIntoContainer<P, T extends Component<P, ComponentState>>( | ||
@@ -52,3 +64,4 @@ parentComponent: Component<any>, | ||
container: Element, | ||
callback?: (component: T) => any): T; | ||
callback?: (component: T) => any, | ||
): T; | ||
export function unstable_renderSubtreeIntoContainer<P>( | ||
@@ -58,3 +71,4 @@ parentComponent: Component<any>, | ||
container: Element, | ||
callback?: (component?: Component<P, ComponentState> | Element) => any): Component<P, ComponentState> | Element | void; | ||
callback?: (component?: Component<P, ComponentState> | Element) => any, | ||
): Component<P, ComponentState> | Element | void; | ||
@@ -69,4 +83,4 @@ export type Container = Element | Document | DocumentFragment; | ||
element: DOMElement<DOMAttributes<T>, T>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): T; | ||
@@ -76,4 +90,4 @@ | ||
element: Array<DOMElement<DOMAttributes<any>, any>>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): Element; | ||
@@ -83,4 +97,4 @@ | ||
element: FunctionComponentElement<any> | Array<FunctionComponentElement<any>>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): void; | ||
@@ -90,4 +104,4 @@ | ||
element: CElement<P, T>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): T; | ||
@@ -97,4 +111,4 @@ | ||
element: Array<CElement<any, Component<any, ComponentState>>>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): Component<any, ComponentState>; | ||
@@ -104,4 +118,4 @@ | ||
element: ReactElement<P>, | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): Component<P, ComponentState> | Element | void; | ||
@@ -111,5 +125,5 @@ | ||
element: ReactElement[], | ||
container: Container| null, | ||
callback?: () => void | ||
container: Container | null, | ||
callback?: () => void, | ||
): Component<any, ComponentState> | Element | void; | ||
} |
{ | ||
"name": "@types/react-dom", | ||
"version": "18.2.7", | ||
"version": "18.2.8", | ||
"description": "TypeScript definitions for React (react-dom)", | ||
@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
}, | ||
"typesPublisherContentHash": "726a49383efba462b3ec2c83e7628b88070ea64986c3f1b2de67241452512b5a", | ||
"typeScriptVersion": "4.3", | ||
"typesPublisherContentHash": "f37f361aad53e3f7a39972574a1b1cab2abe083c8bf24b0529d11877c5e0f940", | ||
"typeScriptVersion": "4.5", | ||
"exports": { | ||
@@ -56,0 +56,0 @@ ".": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 12 Jul 2023 19:02:46 GMT | ||
* Last updated: Wed, 27 Sep 2023 07:12:04 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: `ReactDOM`, `ReactDOMServer` |
@@ -24,4 +24,4 @@ // forward declarations | ||
import { ReactElement, ReactNode } from 'react'; | ||
import { ErrorInfo } from './client'; | ||
import { ReactElement, ReactNode } from "react"; | ||
import { ErrorInfo } from "./client"; | ||
@@ -28,0 +28,0 @@ export interface RenderToPipeableStreamOptions { |
import { | ||
AbstractView, Component, ComponentClass, | ||
ReactElement, ReactInstance, ClassType, | ||
DOMElement, FunctionComponentElement, CElement, | ||
ReactHTMLElement, DOMAttributes, FC | ||
} from 'react'; | ||
AbstractView, | ||
CElement, | ||
ClassType, | ||
Component, | ||
ComponentClass, | ||
DOMAttributes, | ||
DOMElement, | ||
FC, | ||
FunctionComponentElement, | ||
ReactElement, | ||
ReactHTMLElement, | ||
ReactInstance, | ||
} from "react"; | ||
@@ -27,3 +35,17 @@ import * as ReactTestUtils from "."; | ||
export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock"; | ||
export type ModifierKey = | ||
| "Alt" | ||
| "AltGraph" | ||
| "CapsLock" | ||
| "Control" | ||
| "Fn" | ||
| "FnLock" | ||
| "Hyper" | ||
| "Meta" | ||
| "NumLock" | ||
| "ScrollLock" | ||
| "Shift" | ||
| "Super" | ||
| "Symbol" | ||
| "SymbolLock"; | ||
@@ -67,3 +89,3 @@ export interface SyntheticEventData extends OptionalEventProperties { | ||
export interface MockedComponentClass { | ||
new (props: any): any; | ||
new(props: any): any; | ||
} | ||
@@ -87,3 +109,3 @@ | ||
*/ | ||
export namespace Simulate { | ||
export namespace Simulate { | ||
const abort: EventSimulator; | ||
@@ -180,5 +202,7 @@ const animationEnd: EventSimulator; | ||
export function renderIntoDocument<T extends Element>( | ||
element: DOMElement<any, T>): T; | ||
element: DOMElement<any, T>, | ||
): T; | ||
export function renderIntoDocument( | ||
element: FunctionComponentElement<any>): void; | ||
element: FunctionComponentElement<any>, | ||
): void; | ||
// If we replace `P` with `any` in this overload, then some tests fail because | ||
@@ -189,5 +213,7 @@ // calls to `renderIntoDocument` choose the last overload on the | ||
export function renderIntoDocument<P, T extends Component<P>>( | ||
element: CElement<P, T>): T; | ||
element: CElement<P, T>, | ||
): T; | ||
export function renderIntoDocument<P>( | ||
element: ReactElement<P>): Component<P> | Element | void; | ||
element: ReactElement<P>, | ||
): Component<P> | Element | void; | ||
@@ -200,3 +226,5 @@ /** | ||
export function mockComponent( | ||
mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils; | ||
mocked: MockedComponentClass, | ||
mockTagName?: string, | ||
): typeof ReactTestUtils; | ||
@@ -212,3 +240,5 @@ /** | ||
export function isElementOfType<T extends HTMLElement>( | ||
element: ReactElement, type: string): element is ReactHTMLElement<T>; | ||
element: ReactElement, | ||
type: string, | ||
): element is ReactHTMLElement<T>; | ||
/** | ||
@@ -218,3 +248,5 @@ * Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
export function isElementOfType<P extends DOMAttributes<{}>, T extends Element>( | ||
element: ReactElement, type: string): element is DOMElement<P, T>; | ||
element: ReactElement, | ||
type: string, | ||
): element is DOMElement<P, T>; | ||
/** | ||
@@ -224,3 +256,5 @@ * Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
export function isElementOfType<P>( | ||
element: ReactElement, type: FC<P>): element is FunctionComponentElement<P>; | ||
element: ReactElement, | ||
type: FC<P>, | ||
): element is FunctionComponentElement<P>; | ||
/** | ||
@@ -230,3 +264,5 @@ * Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
export function isElementOfType<P, T extends Component<P>, C extends ComponentClass<P>>( | ||
element: ReactElement, type: ClassType<P, T, C>): element is CElement<P, T>; | ||
element: ReactElement, | ||
type: ClassType<P, T, C>, | ||
): element is CElement<P, T>; | ||
@@ -245,3 +281,5 @@ /** | ||
export function isCompositeComponentWithType<T extends Component<any>, C extends ComponentClass<any>>( | ||
instance: ReactInstance, type: ClassType<any, T, C>): boolean; | ||
instance: ReactInstance, | ||
type: ClassType<any, T, C>, | ||
): boolean; | ||
@@ -255,3 +293,4 @@ /** | ||
root: Component<any>, | ||
fn: (i: ReactInstance) => boolean): ReactInstance[]; | ||
fn: (i: ReactInstance) => boolean, | ||
): ReactInstance[]; | ||
@@ -264,3 +303,4 @@ /** | ||
root: Component<any>, | ||
className: string): Element[]; | ||
className: string, | ||
): Element[]; | ||
/** | ||
@@ -273,3 +313,4 @@ * Like `scryRenderedDOMComponentsWithClass()` but expects there to be one result, | ||
root: Component<any>, | ||
className: string): Element; | ||
className: string, | ||
): Element; | ||
@@ -282,3 +323,4 @@ /** | ||
root: Component<any>, | ||
tagName: string): Element[]; | ||
tagName: string, | ||
): Element[]; | ||
/** | ||
@@ -291,3 +333,4 @@ * Like `scryRenderedDOMComponentsWithTag()` but expects there to be one result, | ||
root: Component<any>, | ||
tagName: string): Element; | ||
tagName: string, | ||
): Element; | ||
@@ -299,3 +342,4 @@ /** | ||
root: Component<any>, | ||
type: ClassType<any, T, C>): T[]; | ||
type: ClassType<any, T, C>, | ||
): T[]; | ||
@@ -309,3 +353,4 @@ /** | ||
root: Component<any>, | ||
type: ClassType<any, T, C>): T; | ||
type: ClassType<any, T, C>, | ||
): T; | ||
@@ -312,0 +357,0 @@ /** |
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
30440
697