@@ -4007,7 +4007,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
40074007 const hasDefaultOnly = isOnlyImportedAsDefault(specifier);
40084008 const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier);
40094009 if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {
4010- if (hasExportAssignmentSymbol(moduleSymbol) && !(getAllowSyntheticDefaultImports(compilerOptions) || getESModuleInterop(compilerOptions)) ) {
4010+ if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports ) {
40114011 const compilerOptionName = moduleKind >= ModuleKind.ES2015 ? "allowSyntheticDefaultImports" : "esModuleInterop";
40124012 const exportEqualsSymbol = moduleSymbol.exports!.get(InternalSymbolName.ExportEquals);
40134013 const exportAssignment = exportEqualsSymbol!.valueDeclaration;
@@ -4150,7 +4150,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
41504150 if (!isIdentifier(name)) {
41514151 return undefined;
41524152 }
4153- const suppressInteropError = name.escapedText === InternalSymbolName.Default && !!(getAllowSyntheticDefaultImports(compilerOptions) );
4153+ const suppressInteropError = name.escapedText === InternalSymbolName.Default && allowSyntheticDefaultImports );
41544154 const targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, /*dontResolveAlias*/ false, suppressInteropError);
41554155 if (targetSymbol) {
41564156 if (name.escapedText) {
@@ -9205,7 +9205,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
92059205 // If `target` refers to a shorthand module symbol, the name we're trying to pull out isn;t recoverable from the target symbol
92069206 // In such a scenario, we must fall back to looking for an alias declaration on `symbol` and pulling the target name from that
92079207 let verbatimTargetName = isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || unescapeLeadingUnderscores(target.escapedName);
9208- if (verbatimTargetName === InternalSymbolName.ExportEquals && getAllowSyntheticDefaultImports(compilerOptions) ) {
9208+ if (verbatimTargetName === InternalSymbolName.ExportEquals && allowSyntheticDefaultImports ) {
92099209 // target refers to an `export=` symbol that was hoisted into a synthetic default - rename here to match
92109210 verbatimTargetName = InternalSymbolName.Default;
92119211 }
0 commit comments