mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Clean up error messages for using TypeScript syntax in JavaScr… (#35254)
* Fix up quotation marks in error messages in JavaScript files. * Accepted baselines. * Typescript -> TypeScript * Accepted baselines. * Migrate syntactic diagnostics tests to baselining tests. * Accepted baselines. * Update diagnosticMessages.json * Removed markers. * Add ability to baseline both semantic and syntactic diagnostics. * Fix up broken diagnostics when using a server LS. * Accepted baselines. * Lints. * Fake up sourcefile objects in the tsserver session client instead. * Fewer allocations.
This commit is contained in:
committed by
GitHub
parent
3e329469c1
commit
3da85df511
@@ -1539,7 +1539,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (element.questionToken) {
|
||||
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics._0_can_only_be_used_in_a_ts_file, "?"));
|
||||
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?"));
|
||||
}
|
||||
if (!isDoubleQuotedString(element.name)) {
|
||||
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected));
|
||||
|
||||
Reference in New Issue
Block a user