Enable allowSyntheticDefaultImports if esModuleInterop is enabled

Fixes #26193.
This commit is contained in:
Minh Nguyen
2018-09-04 11:07:29 +01:00
parent 45101491c0
commit aaa723e2d2
5 changed files with 64 additions and 3 deletions
+2 -3
View File
@@ -7020,9 +7020,8 @@ namespace ts {
const moduleKind = getEmitModuleKind(compilerOptions);
return compilerOptions.allowSyntheticDefaultImports !== undefined
? compilerOptions.allowSyntheticDefaultImports
: compilerOptions.esModuleInterop
? moduleKind !== ModuleKind.None && moduleKind < ModuleKind.ES2015
: moduleKind === ModuleKind.System;
: compilerOptions.esModuleInterop ||
moduleKind === ModuleKind.System;
}
export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean {