Skip to content

Commit 81f977a

Browse files
committed
chore: use upstream types for react-test-renderer
1 parent f6c895b commit 81f977a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

flow-typed/npm/react-test-renderer_v16.x.x.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 9b9f4128694a7f68659d945b81fb78ff
2-
// flow-typed version: 46dfe79a54/react-test-renderer_v16.x.x/flow_>=v0.47.x
1+
// flow-typed signature: b6bb53397d83d2d821e258cc73818d1b
2+
// flow-typed version: 9c71eca8ef/react-test-renderer_v16.x.x/flow_>=v0.47.x
33

44
// Type definitions for react-test-renderer 16.x.x
55
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer
@@ -9,18 +9,18 @@ type ReactComponentInstance = React$Component<any>;
99
type ReactTestRendererJSON = {
1010
type: string,
1111
props: { [propName: string]: any },
12-
children: null | ReactTestRendererJSON[],
12+
children: null | ReactTestRendererJSON[]
1313
};
1414

1515
type ReactTestRendererTree = ReactTestRendererJSON & {
16-
nodeType: 'component' | 'host',
16+
nodeType: "component" | "host",
1717
instance: ?ReactComponentInstance,
18-
rendered: null | ReactTestRendererTree,
18+
rendered: null | ReactTestRendererTree
1919
};
2020

2121
type ReactTestInstance = {
2222
instance: ?ReactComponentInstance,
23-
type: string | Function,
23+
type: string,
2424
props: { [propName: string]: any },
2525
parent: null | ReactTestInstance,
2626
children: Array<ReactTestInstance | string>,
@@ -40,25 +40,25 @@ type ReactTestInstance = {
4040
findAllByProps(
4141
props: { [propName: string]: any },
4242
options?: { deep: boolean }
43-
): ReactTestInstance[],
43+
): ReactTestInstance[]
4444
};
4545

4646
type TestRendererOptions = {
47-
createNodeMock(element: React$Element<any>): any,
48-
};
49-
50-
type Thenable = {
51-
then(resolve: () => mixed, reject?: () => mixed): mixed,
47+
createNodeMock(element: React$Element<any>): any
5248
};
5349

54-
declare module 'react-test-renderer' {
50+
declare module "react-test-renderer" {
5551
declare export type ReactTestRenderer = {
5652
toJSON(): null | ReactTestRendererJSON,
5753
toTree(): null | ReactTestRendererTree,
5854
unmount(nextElement?: React$Element<any>): void,
5955
update(nextElement: React$Element<any>): void,
6056
getInstance(): ?ReactComponentInstance,
61-
root: ReactTestInstance,
57+
root: ReactTestInstance
58+
};
59+
60+
declare type Thenable = {
61+
then(resolve: () => mixed, reject?: () => mixed): mixed,
6262
};
6363

6464
declare function create(
@@ -69,7 +69,7 @@ declare module 'react-test-renderer' {
6969
declare function act(callback: () => void): Thenable;
7070
}
7171

72-
declare module 'react-test-renderer/shallow' {
72+
declare module "react-test-renderer/shallow" {
7373
declare export default class ShallowRenderer {
7474
static createRenderer(): ShallowRenderer;
7575
getMountedInstance(): ReactTestInstance;

0 commit comments

Comments
 (0)