diff --git a/flow-typed/jest.js b/flow-typed/jest.js index 5f42ea1358..5d573d0a96 100644 --- a/flow-typed/jest.js +++ b/flow-typed/jest.js @@ -247,7 +247,7 @@ type EnzymeMatchersType = { toContainMatchingElement(selector: string): void, toContainMatchingElements(n: number, selector: string): void, toContainExactlyOneMatchingElement(selector: string): void, - toContainReact(element: React$Element): void, + toContainReact(element: React.MixedElement): void, toExist(): void, toHaveClassName(className: string): void, toHaveHTML(html: string): void, @@ -263,7 +263,7 @@ type EnzymeMatchersType = { toHaveValue(value: any): void, toIncludeText(text: string): void, toMatchElement( - element: React$Element, + element: React.MixedElement, options?: {|ignoreProps?: boolean, verbose?: boolean|}, ): void, toMatchSelector(selector: string): void, diff --git a/flow-typed/npm/react-test-renderer_v16.x.x.js b/flow-typed/npm/react-test-renderer_v16.x.x.js index 44dc3e2c71..406dbafc0b 100644 --- a/flow-typed/npm/react-test-renderer_v16.x.x.js +++ b/flow-typed/npm/react-test-renderer_v16.x.x.js @@ -1,6 +1,3 @@ -// flow-typed signature: 7bac6c05f7415881918d3d510109e739 -// flow-typed version: fce74493f0/react-test-renderer_v16.x.x/flow_>=v0.104.x - // Type definitions for react-test-renderer 16.x.x // Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer @@ -44,14 +41,14 @@ type ReactTestInstance = { ... }; -type TestRendererOptions = { createNodeMock(element: React$Element): any, ... }; +type TestRendererOptions = { createNodeMock(element: React.MixedElement): any, ... }; declare module "react-test-renderer" { declare export type ReactTestRenderer = { toJSON(): null | ReactTestRendererJSON, toTree(): null | ReactTestRendererTree, - unmount(nextElement?: React$Element): void, - update(nextElement: React$Element): void, + unmount(nextElement?: React.MixedElement): void, + update(nextElement: React.MixedElement): void, getInstance(): ?ReactComponentInstance, root: ReactTestInstance, ... @@ -60,7 +57,7 @@ declare module "react-test-renderer" { declare type Thenable = { then(resolve: () => mixed, reject?: () => mixed): mixed, ... }; declare function create( - nextElement: React$Element, + nextElement: React.MixedElement, options?: TestRendererOptions ): ReactTestRenderer; @@ -71,9 +68,9 @@ declare module "react-test-renderer/shallow" { declare export default class ShallowRenderer { static createRenderer(): ShallowRenderer; getMountedInstance(): ReactTestInstance; - getRenderOutput>(): E; - getRenderOutput(): React$Element; - render(element: React$Element, context?: any): void; + getRenderOutput(): E; + getRenderOutput(): React.MixedElement; + render(element: React.MixedElement, context?: any): void; unmount(): void; } }