|
| 1 | +=== tests/cases/compiler/jsxDeclarationsWithEsModuleInteropNoCrash.jsx === |
| 2 | +/// <reference path="react16.d.ts" /> |
| 3 | +import PropTypes from 'prop-types'; |
| 4 | +>PropTypes : Symbol(PropTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 1, 6)) |
| 5 | + |
| 6 | +import React from 'react'; |
| 7 | +>React : Symbol(React, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 2, 6)) |
| 8 | + |
| 9 | +const propTypes = { |
| 10 | +>propTypes : Symbol(propTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 4, 5)) |
| 11 | + |
| 12 | + bar: PropTypes.bool, |
| 13 | +>bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 4, 19)) |
| 14 | +>PropTypes.bool : Symbol(PropTypes.bool, Decl(react16.d.ts, 62, 16)) |
| 15 | +>PropTypes : Symbol(PropTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 1, 6)) |
| 16 | +>bool : Symbol(PropTypes.bool, Decl(react16.d.ts, 62, 16)) |
| 17 | + |
| 18 | +}; |
| 19 | + |
| 20 | +const defaultProps = { |
| 21 | +>defaultProps : Symbol(defaultProps, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 8, 5)) |
| 22 | + |
| 23 | + bar: false, |
| 24 | +>bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 8, 22)) |
| 25 | + |
| 26 | +}; |
| 27 | + |
| 28 | +function Foo({ bar }) { |
| 29 | +>Foo : Symbol(Foo, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 10, 2), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 30 | +>bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 12, 14)) |
| 31 | + |
| 32 | + return <div>{bar}</div>; |
| 33 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 34 | +>bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 12, 14)) |
| 35 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 36 | +} |
| 37 | + |
| 38 | +Foo.propTypes = propTypes; |
| 39 | +>Foo.propTypes : Symbol(Foo.propTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1)) |
| 40 | +>Foo : Symbol(Foo, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 10, 2), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 41 | +>propTypes : Symbol(Foo.propTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1)) |
| 42 | +>propTypes : Symbol(propTypes, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 4, 5)) |
| 43 | + |
| 44 | +Foo.defaultProps = defaultProps; |
| 45 | +>Foo.defaultProps : Symbol(Foo.defaultProps, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 46 | +>Foo : Symbol(Foo, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 10, 2), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 47 | +>defaultProps : Symbol(Foo.defaultProps, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 48 | +>defaultProps : Symbol(defaultProps, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 8, 5)) |
| 49 | + |
| 50 | +export default Foo; |
| 51 | +>Foo : Symbol(Foo, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 10, 2), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 14, 1), Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 16, 26)) |
| 52 | + |
0 commit comments