From #44656
Should this function return ModuleKind.ES2020 and ES2022 following the target version? It seems #33893 missed this, and I wonder this needs to be fixed.
|
export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { |
|
return typeof compilerOptions.module === "number" ? |
|
compilerOptions.module : |
|
getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; |
|
} |
From #44656