Merge pull request #29363 from Kingwl/type_arguments_for_jsx

Emit jsx type arguments
This commit is contained in:
Daniel Rosenwasser 2019-01-11 00:50:58 -08:00 committed by GitHub
commit c146d1f8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}