Respond to CR
This commit is contained in:
parent
a7f9ec00ed
commit
fb058868de
|
@ -3611,7 +3611,7 @@
|
|||
"category": "Error",
|
||||
"code": 17014
|
||||
},
|
||||
"Expected corresponding JSX fragment closing tag.": {
|
||||
"Expected corresponding closing tag for JSX fragment.": {
|
||||
"category": "Error",
|
||||
"code": 17015
|
||||
},
|
||||
|
|
|
@ -2090,9 +2090,9 @@ namespace ts {
|
|||
|
||||
if (isJsxOpeningElement(node)) {
|
||||
emitJsxTagName(node.tagName);
|
||||
writeIfAny(node.attributes.properties, " ");
|
||||
// We are checking here so we won't re-enter the emitting pipeline and emit extra sourcemap
|
||||
if (node.attributes.properties && node.attributes.properties.length > 0) {
|
||||
write(" ");
|
||||
emit(node.attributes);
|
||||
}
|
||||
}
|
||||
|
@ -2627,12 +2627,6 @@ namespace ts {
|
|||
writer.decreaseIndent();
|
||||
}
|
||||
|
||||
function writeIfAny(nodes: NodeArray<Node>, text: string) {
|
||||
if (some(nodes)) {
|
||||
write(text);
|
||||
}
|
||||
}
|
||||
|
||||
function writeToken(token: SyntaxKind, pos: number, contextNode?: Node) {
|
||||
return onEmitSourceMapOfToken
|
||||
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
|
||||
|
|
|
@ -4213,7 +4213,7 @@ namespace ts {
|
|||
parseExpected(SyntaxKind.LessThanSlashToken);
|
||||
if (tokenIsIdentifierOrKeyword(token())) {
|
||||
const unexpectedTagName = parseJsxElementName();
|
||||
parseErrorAtPosition(unexpectedTagName.pos, unexpectedTagName.end - unexpectedTagName.pos, Diagnostics.Expected_corresponding_JSX_fragment_closing_tag);
|
||||
parseErrorAtPosition(unexpectedTagName.pos, unexpectedTagName.end - unexpectedTagName.pos, Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);
|
||||
}
|
||||
if (inExpressionContext) {
|
||||
parseExpected(SyntaxKind.GreaterThanToken);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(9,7): error TS17015: Expected corresponding JSX fragment closing tag.
|
||||
tests/cases/conformance/jsx/file.tsx(9,7): error TS17015: Expected corresponding closing tag for JSX fragment.
|
||||
tests/cases/conformance/jsx/file.tsx(9,11): error TS17014: JSX fragment has no corresponding closing tag.
|
||||
tests/cases/conformance/jsx/file.tsx(11,17): error TS1005: '</' expected.
|
||||
|
||||
|
@ -14,7 +14,7 @@ tests/cases/conformance/jsx/file.tsx(11,17): error TS1005: '</' expected.
|
|||
|
||||
<>hi</div> // Error
|
||||
~~~
|
||||
!!! error TS17015: Expected corresponding JSX fragment closing tag.
|
||||
!!! error TS17015: Expected corresponding closing tag for JSX fragment.
|
||||
~~~~~~~~~
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue