File: react-test-renderer_vx.x.x.js

package info (click to toggle)
node-emotion 11.10.7%2Bds1%2B~cs8.3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,816 kB
  • sloc: javascript: 26,863; makefile: 25
file content (43 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// flow-typed signature: b39646fcd6b54764b610c38b101a4fdd
// flow-typed version: <<STUB>>/react-test-renderer_v^16.0.0/flow_v0.59.0

/**
 * This is an autogenerated libdef stub for:
 *
 *   'react-test-renderer'
 *
 * Fill this stub out by replacing all the `any` types.
 *
 * Once filled out, we encourage you to share your work with the
 * community by sending a pull request to:
 * https://github.com/flowtype/flow-typed
 */

type TestRendererOptions = {
  createNodeMock: (element: React$Element<any>) => any
}

type ReactTestRendererNode = ReactTestRendererJSON | string

type ReactTestRendererJSON = {|
  type: string,
  props: { [propName: string]: any },
  children: null | Array<ReactTestRendererNode>,
  $$typeof?: Symbol // Optional because we add it with defineProperty().
|}

declare module 'react-test-renderer' {
  declare module.exports: {
    create: (
      element: React$Element<any>,
      options?: TestRendererOptions
    ) => {
      toJSON: () => ReactTestRendererJSON,
      update: (newElement: React$Element<any>) => void,
      unmount: () => void,
      toTree: () => any,
      getInstance: () => any,
      root: any
    }
  }
}