@types/react-dom
Advanced tools
Comparing version 18.2.25 to 18.3.0
@@ -20,3 +20,9 @@ // NOTE: Users of the `experimental` builds of React should add a reference | ||
/** | ||
* @deprecated See https://react.dev/reference/react-dom/findDOMNode#alternatives | ||
*/ | ||
export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text; | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
export function unmountComponentAtNode(container: Element | DocumentFragment): boolean; | ||
@@ -31,3 +37,9 @@ | ||
export const version: string; | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
export const render: Renderer; | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
export const hydrate: Renderer; | ||
@@ -40,2 +52,5 @@ | ||
/** | ||
* @deprecated | ||
*/ | ||
export function unstable_renderSubtreeIntoContainer<T extends Element>( | ||
@@ -47,2 +62,5 @@ parentComponent: Component<any>, | ||
): T; | ||
/** | ||
* @deprecated | ||
*/ | ||
export function unstable_renderSubtreeIntoContainer<P, T extends Component<P, ComponentState>>( | ||
@@ -54,2 +72,5 @@ parentComponent: Component<any>, | ||
): T; | ||
/** | ||
* @deprecated | ||
*/ | ||
export function unstable_renderSubtreeIntoContainer<P>( | ||
@@ -69,2 +90,5 @@ parentComponent: Component<any>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
<T extends Element>( | ||
@@ -76,2 +100,5 @@ element: DOMElement<DOMAttributes<T>, T>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
( | ||
@@ -83,2 +110,5 @@ element: Array<DOMElement<DOMAttributes<any>, any>>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
( | ||
@@ -90,2 +120,5 @@ element: FunctionComponentElement<any> | Array<FunctionComponentElement<any>>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
<P, T extends Component<P, ComponentState>>( | ||
@@ -97,2 +130,5 @@ element: CElement<P, T>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
( | ||
@@ -104,2 +140,5 @@ element: Array<CElement<any, Component<any, ComponentState>>>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
<P>( | ||
@@ -112,2 +151,5 @@ element: ReactElement<P>, | ||
/** | ||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis | ||
*/ | ||
( | ||
@@ -114,0 +156,0 @@ element: ReactElement[], |
{ | ||
"name": "@types/react-dom", | ||
"version": "18.2.25", | ||
"version": "18.3.0", | ||
"description": "TypeScript definitions for react-dom", | ||
@@ -85,4 +85,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", | ||
}, | ||
"typesPublisherContentHash": "f40629d5026f3736ee6b73b08f55621bdb75b507233003effbdd00fd94f23d2e", | ||
"typesPublisherContentHash": "6e701783391e040466f55ff67d4efe35c3cbc5868b0a0937f1dfb8f63fce36fc", | ||
"typeScriptVersion": "4.7" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 11 Apr 2024 17:35:56 GMT | ||
* Last updated: Thu, 25 Apr 2024 20:07:03 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ |
@@ -93,2 +93,4 @@ // forward declarations | ||
* is exactly equal to what `ReactDOMServer.renderToStaticMarkup()` would return. | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -95,0 +97,0 @@ export function renderToStaticNodeStream(element: ReactNode, options?: ServerOptions): NodeJS.ReadableStream; |
@@ -197,2 +197,3 @@ import { | ||
* Render a React element into a detached DOM node in the document. __This function requires a DOM__. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -202,2 +203,3 @@ export function renderIntoDocument<T extends Element>( | ||
): T; | ||
/** @deprecated https://react.dev/warnings/react-dom-test-utils */ | ||
export function renderIntoDocument( | ||
@@ -210,5 +212,11 @@ element: FunctionComponentElement<any>, | ||
// allows this overload to match on the subtype-relation pass. | ||
/** | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
export function renderIntoDocument<P, T extends Component<P>>( | ||
element: CElement<P, T>, | ||
): T; | ||
/** | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
export function renderIntoDocument<P>( | ||
@@ -222,2 +230,3 @@ element: ReactElement<P>, | ||
* a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -231,2 +240,3 @@ export function mockComponent( | ||
* Returns `true` if `element` is any React element. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -237,2 +247,3 @@ export function isElement(element: any): boolean; | ||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -245,2 +256,3 @@ export function isElementOfType<T extends HTMLElement>( | ||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -253,2 +265,3 @@ export function isElementOfType<P extends DOMAttributes<{}>, T extends Element>( | ||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -261,2 +274,3 @@ export function isElementOfType<P>( | ||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -270,2 +284,3 @@ export function isElementOfType<P, T extends Component<P>, C extends ComponentClass<P>>( | ||
* Returns `true` if `instance` is a DOM component (such as a `<div>` or `<span>`). | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -275,2 +290,3 @@ export function isDOMComponent(instance: ReactInstance): instance is Element; | ||
* Returns `true` if `instance` is a user-defined component, such as a class or a function. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -280,2 +296,3 @@ export function isCompositeComponent(instance: ReactInstance): instance is Component<any>; | ||
* Returns `true` if `instance` is a component whose type is of a React `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -291,2 +308,3 @@ export function isCompositeComponentWithType<T extends Component<any>, C extends ComponentClass<any>>( | ||
* as a primitive for other test utils. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -301,2 +319,3 @@ export function findAllInRenderedTree( | ||
* DOM components with the class name matching `className`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -311,2 +330,3 @@ export function scryRenderedDOMComponentsWithClass( | ||
* number of matches besides one. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -321,2 +341,3 @@ export function findRenderedDOMComponentWithClass( | ||
* DOM components with the tag name matching `tagName`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -331,2 +352,3 @@ export function scryRenderedDOMComponentsWithTag( | ||
* number of matches besides one. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -340,2 +362,3 @@ export function findRenderedDOMComponentWithTag( | ||
* Finds all instances of components with type equal to `componentClass`. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -351,2 +374,3 @@ export function scryRenderedComponentsWithType<T extends Component<any>, C extends ComponentClass<any>>( | ||
* number of matches besides one. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
@@ -360,5 +384,14 @@ export function findRenderedComponentWithType<T extends Component<any>, C extends ComponentClass<any>>( | ||
* Call this in your tests to create a shallow renderer. | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
export function createRenderer(): ShallowRenderer; | ||
// NOTES | ||
// - the order of these signatures matters - typescript will check the signatures in source order. | ||
// If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with | ||
// `strictNullChecks: false`. | ||
// - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true` | ||
declare const UNDEFINED_VOID_ONLY: unique symbol; | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; | ||
/** | ||
@@ -374,13 +407,10 @@ * Wrap any code rendering and triggering updates to your components into `act()` calls. | ||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks | ||
* | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
// NOTES | ||
// - the order of these signatures matters - typescript will check the signatures in source order. | ||
// If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with | ||
// `strictNullChecks: false`. | ||
// - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true` | ||
declare const UNDEFINED_VOID_ONLY: unique symbol; | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; | ||
// While act does always return Thenable, if a void function is passed, we pretend the return value is also void to not trigger dangling Promise lint rules. | ||
export function act(callback: () => VoidOrUndefinedOnly): void; | ||
/** | ||
* @deprecated https://react.dev/warnings/react-dom-test-utils | ||
*/ | ||
export function act<T>(callback: () => T | Promise<T>): Promise<T>; | ||
@@ -387,0 +417,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
37837
880