emit jsx type arguments

This commit is contained in:
王文璐 2019-01-11 13:34:18 +08:00
parent aba0b700b6
commit 9d16225bc2

View file

@ -2561,6 +2561,7 @@ namespace ts {
function emitJsxSelfClosingElement(node: JsxSelfClosingElement) {
writePunctuation("<");
emitJsxTagName(node.tagName);
emitTypeArguments(node, node.typeArguments);
writeSpace();
emit(node.attributes);
writePunctuation("/>");
@ -2577,6 +2578,7 @@ namespace ts {
if (isJsxOpeningElement(node)) {
emitJsxTagName(node.tagName);
emitTypeArguments(node, node.typeArguments);
if (node.attributes.properties && node.attributes.properties.length > 0) {
writeSpace();
}