mergeSymbol in checker:Remove block-scoped duplicate declaration errors in plain JS (#47825)

* Checker:Remove block-scoped duplicate declaration errors in plain JS

Previously they were issued in mergeSymbol, not they are not issued.

* fix semicolon lint
This commit is contained in:
Nathan Shively-Sanders
2022-02-09 16:26:27 -08:00
committed by GitHub
parent 95c22d1750
commit 42aa18bf44
4 changed files with 16 additions and 15 deletions

View File

@@ -2102,7 +2102,7 @@ namespace ts {
const isJs = sourceFile.scriptKind === ScriptKind.JS || sourceFile.scriptKind === ScriptKind.JSX;
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
const isPlainJs = isJs && !sourceFile.checkJsDirective && options.checkJs === undefined;
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
const isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;
// By default, only type-check .ts, .tsx, Deferred, plain JS, checked JS and External