diff options
author | Steven Guerrero <42647963+Soremwar@users.noreply.github.com> | 2020-04-13 12:15:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 13:15:18 -0400 |
commit | 8397cd52a5ec915a0b5e85d337cfcc38f4aaa63f (patch) | |
tree | a36ae457fd502205153dc7f3b1f777ff1bf40924 /std/types/react-dom.d.ts | |
parent | 25bd6868e5af9f30656dabeff9683b256e0a9370 (diff) |
Refactor std/types (#4713)
Diffstat (limited to 'std/types/react-dom.d.ts')
-rw-r--r-- | std/types/react-dom.d.ts | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/std/types/react-dom.d.ts b/std/types/react-dom.d.ts deleted file mode 100644 index 3be59411f..000000000 --- a/std/types/react-dom.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -// These types are adapted from -// https://github.com/DefinitelyTyped/DefinitelyTyped to work under Deno. -// -// Type definitions for React (react-dom) 16.9 -// Project: http://facebook.github.io/react/ -// 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> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -// NOTE: Users of the `experimental` builds of React should add a reference -// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment -// for reference and documentation on how exactly to do it. - -/* eslint-disable */ - -export as namespace ReactDOM; - -import { - ReactInstance, - Component, - ComponentState, - ReactElement, - SFCElement, - CElement, - DOMAttributes, - DOMElement, - ReactNode, - ReactPortal, -} from "./react.d.ts"; - -export function findDOMNode( - instance: ReactInstance | null | undefined -): Element | null | Text; -export function unmountComponentAtNode(container: Element): boolean; - -export function createPortal( - children: ReactNode, - container: Element, - key?: null | string -): ReactPortal; - -export const version: string; -export const render: Renderer; -export const hydrate: Renderer; - -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_renderSubtreeIntoContainer<T extends Element>( - parentComponent: Component<any>, - element: DOMElement<DOMAttributes<T>, T>, - container: Element, - callback?: (element: T) => any -): T; -export function unstable_renderSubtreeIntoContainer< - P, - T extends Component<P, ComponentState> ->( - parentComponent: Component<any>, - element: CElement<P, T>, - container: Element, - callback?: (component: T) => any -): T; -export function unstable_renderSubtreeIntoContainer<P>( - parentComponent: Component<any>, - element: ReactElement<P>, - container: Element, - callback?: (component?: Component<P, ComponentState> | Element) => any -): Component<P, ComponentState> | Element | void; - -export interface Renderer { - // Deprecated(render): The return value is deprecated. - // In future releases the render function's return type will be void. - - <T extends Element>( - element: DOMElement<DOMAttributes<T>, T>, - container: Element | null, - callback?: () => void - ): T; - - ( - element: Array<DOMElement<DOMAttributes<any>, any>>, - container: Element | null, - callback?: () => void - ): Element; - - ( - element: SFCElement<any> | Array<SFCElement<any>>, - container: Element | null, - callback?: () => void - ): void; - - <P, T extends Component<P, ComponentState>>( - element: CElement<P, T>, - container: Element | null, - callback?: () => void - ): T; - - ( - element: Array<CElement<any, Component<any, ComponentState>>>, - container: Element | null, - callback?: () => void - ): Component<any, ComponentState>; - - <P>( - element: ReactElement<P>, - container: Element | null, - callback?: () => void - ): Component<P, ComponentState> | Element | void; - - (element: ReactElement[], container: Element | null, callback?: () => void): - | Component<any, ComponentState> - | Element - | void; -} |