mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-15 03:09:59 -05:00
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
This commit is contained in:
@@ -37315,8 +37315,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
||||
}
|
||||
if (compilerOptions.erasableSyntaxOnly) {
|
||||
const start = node.type.pos - "<".length;
|
||||
const end = skipTrivia(file.text, node.type.end) + ">".length;
|
||||
const start = skipTrivia(file.text, node.pos);
|
||||
const end = node.expression.pos;
|
||||
diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user