@@ -4007,7 +4007,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4007
4007
const hasDefaultOnly = isOnlyImportedAsDefault(specifier);
4008
4008
const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier);
4009
4009
if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {
4010
- if (hasExportAssignmentSymbol(moduleSymbol) && !(getAllowSyntheticDefaultImports(compilerOptions) || getESModuleInterop(compilerOptions)) ) {
4010
+ if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports ) {
4011
4011
const compilerOptionName = moduleKind >= ModuleKind.ES2015 ? "allowSyntheticDefaultImports" : "esModuleInterop";
4012
4012
const exportEqualsSymbol = moduleSymbol.exports!.get(InternalSymbolName.ExportEquals);
4013
4013
const exportAssignment = exportEqualsSymbol!.valueDeclaration;
@@ -4150,7 +4150,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4150
4150
if (!isIdentifier(name)) {
4151
4151
return undefined;
4152
4152
}
4153
- const suppressInteropError = name.escapedText === InternalSymbolName.Default && !!(getAllowSyntheticDefaultImports(compilerOptions) );
4153
+ const suppressInteropError = name.escapedText === InternalSymbolName.Default && allowSyntheticDefaultImports );
4154
4154
const targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, /*dontResolveAlias*/ false, suppressInteropError);
4155
4155
if (targetSymbol) {
4156
4156
if (name.escapedText) {
@@ -9205,7 +9205,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
9205
9205
// If `target` refers to a shorthand module symbol, the name we're trying to pull out isn;t recoverable from the target symbol
9206
9206
// In such a scenario, we must fall back to looking for an alias declaration on `symbol` and pulling the target name from that
9207
9207
let verbatimTargetName = isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || unescapeLeadingUnderscores(target.escapedName);
9208
- if (verbatimTargetName === InternalSymbolName.ExportEquals && getAllowSyntheticDefaultImports(compilerOptions) ) {
9208
+ if (verbatimTargetName === InternalSymbolName.ExportEquals && allowSyntheticDefaultImports ) {
9209
9209
// target refers to an `export=` symbol that was hoisted into a synthetic default - rename here to match
9210
9210
verbatimTargetName = InternalSymbolName.Default;
9211
9211
}
0 commit comments