mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
fix(58265): JSDoc comment string with the keyword "@private" before import statement in JS file result in cryptic error TS1191 during compilation (#58297)
This commit is contained in:
1 parent
e28ad995d1
commit
501fa6e4e4
4 files changed
+67
-1
No files matched your search
@@ -46331,7 +46331,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
// If we hit an import declaration in an illegal context, just bail out to avoid cascading errors.
|
||||
return;
|
||||
}
|
||||
if (!checkGrammarModifiers(node) && hasEffectiveModifiers(node)) {
|
||||
if (!checkGrammarModifiers(node) && node.modifiers) {
|
||||
grammarErrorOnFirstToken(node, Diagnostics.An_import_declaration_cannot_have_modifiers);
|
||||
}
|
||||
if (checkExternalImportOrExportDeclaration(node)) {
|
||||
|
||||
Reference in new issue
Block a user