mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Throw syntax error for } and > in JSX text (#36636)
* Throw syntax error for `}` and `>` in JSX text Fixes #36341 * Add codefix for error
This commit is contained in:
@@ -1135,6 +1135,14 @@
|
||||
"category": "Error",
|
||||
"code": 1380
|
||||
},
|
||||
"Unexpected token. Did you mean `{'}'}` or `}`?": {
|
||||
"category": "Error",
|
||||
"code": 1381
|
||||
},
|
||||
"Unexpected token. Did you mean `{'>'}` or `>`?": {
|
||||
"category": "Error",
|
||||
"code": 1382
|
||||
},
|
||||
|
||||
"The types of '{0}' are incompatible between these types.": {
|
||||
"category": "Error",
|
||||
@@ -5457,6 +5465,14 @@
|
||||
"category": "Message",
|
||||
"code": 95099
|
||||
},
|
||||
"Convert invalid character to its html entity code": {
|
||||
"category": "Message",
|
||||
"code": 95100
|
||||
},
|
||||
"Wrap invalid character in an expression container": {
|
||||
"category": "Message",
|
||||
"code": 95101
|
||||
},
|
||||
|
||||
"No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -2156,6 +2156,12 @@ namespace ts {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (char === CharacterCodes.greaterThan) {
|
||||
error(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1);
|
||||
}
|
||||
if (char === CharacterCodes.closeBrace) {
|
||||
error(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1);
|
||||
}
|
||||
|
||||
if (lastNonWhitespace > 0) lastNonWhitespace++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user