mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Merge pull request #29363 from Kingwl/type_arguments_for_jsx
Emit jsx type arguments
This commit is contained in:
commit
c146d1f8af
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user