@@ -1878,9 +1878,11 @@ module.exports = function(ast, extra) {
1878
1878
// Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement,
1879
1879
// TypeScript does not seem to have the idea of openingElement when tag is self-closing
1880
1880
node . kind = SyntaxKind . JsxOpeningElement ;
1881
+ var openingElement = convertChild ( node ) ;
1882
+ openingElement . selfClosing = true ;
1881
1883
assign ( result , {
1882
1884
type : "JSXElement" ,
1883
- openingElement : convertChild ( node ) ,
1885
+ openingElement : openingElement ,
1884
1886
closingElement : null ,
1885
1887
children : [ ]
1886
1888
} ) ;
@@ -1891,7 +1893,7 @@ module.exports = function(ast, extra) {
1891
1893
var openingTagName = convertTypeScriptJSXTagNameToESTreeName ( node . tagName ) ;
1892
1894
assign ( result , {
1893
1895
type : "JSXOpeningElement" ,
1894
- selfClosing : ! ( node . parent && node . parent . closingElement ) ,
1896
+ selfClosing : false ,
1895
1897
name : openingTagName ,
1896
1898
attributes : node . attributes . map ( convertChild )
1897
1899
} ) ;
@@ -1933,6 +1935,7 @@ module.exports = function(ast, extra) {
1933
1935
1934
1936
case SyntaxKind . JsxAttribute :
1935
1937
var attributeName = convertToken ( node . name , ast ) ;
1938
+ attributeName . type = "JSXIdentifier" ;
1936
1939
attributeName . name = attributeName . value ;
1937
1940
delete attributeName . value ;
1938
1941
0 commit comments