|
| 1 | +=== tests/cases/compiler/jsxEmptyExpressionNotCountedAsChild.tsx === |
| 2 | +/// <reference path="react16.d.ts" /> |
| 3 | +import * as React from 'react' |
| 4 | +>React : Symbol(React, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 6)) |
| 5 | + |
| 6 | +interface Props { |
| 7 | +>Props : Symbol(Props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 30)) |
| 8 | + |
| 9 | + children: React.ReactElement<any> |
| 10 | +>children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) |
| 11 | +>React : Symbol(React, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 6)) |
| 12 | +>ReactElement : Symbol(React.ReactElement, Decl(react16.d.ts, 135, 9)) |
| 13 | +} |
| 14 | + |
| 15 | +function Wrapper(props: Props) { |
| 16 | +>Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) |
| 17 | +>props : Symbol(props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 7, 17)) |
| 18 | +>Props : Symbol(Props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 30)) |
| 19 | + |
| 20 | + return <div>{props.children}</div> |
| 21 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 22 | +>props.children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) |
| 23 | +>props : Symbol(props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 7, 17)) |
| 24 | +>children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) |
| 25 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 26 | +} |
| 27 | + |
| 28 | +const element = ( |
| 29 | +>element : Symbol(element, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 11, 5)) |
| 30 | + |
| 31 | + <Wrapper> |
| 32 | +>Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) |
| 33 | + |
| 34 | + {/* comment */} |
| 35 | + <div>Hello</div> |
| 36 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 37 | +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) |
| 38 | + |
| 39 | + </Wrapper> |
| 40 | +>Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) |
| 41 | + |
| 42 | +) |
0 commit comments