mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 16:56:06 -05:00
Merge pull request #27669 from Microsoft/betterErrorForAccidentalCall
Always emit diagnostic when a call expression can be fixed by adding a semicolon
This commit is contained in:
@@ -20101,7 +20101,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
let relatedInformation: DiagnosticRelatedInformation | undefined;
|
||||
if (node.arguments.length === 1 && isTypeAssertion(first(node.arguments))) {
|
||||
if (node.arguments.length === 1) {
|
||||
const text = getSourceFileOfNode(node).text;
|
||||
if (isLineBreak(text.charCodeAt(skipTrivia(text, node.expression.end, /* stopAfterLineBreak */ true) - 1))) {
|
||||
relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon);
|
||||
|
||||
Reference in New Issue
Block a user