mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Update default target from ES3 to ES5 (#51731)
* Change the default emit target to ES5 * Add baseline update * Remove tests with a hardcoded sourcemap in it * Update hardcoded tests * Merge with main * Restore tests
This commit is contained in:
@@ -7514,11 +7514,11 @@ export function getSetExternalModuleIndicator(options: CompilerOptions): (file:
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) {
|
||||
export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}): ScriptTarget {
|
||||
return compilerOptions.target ||
|
||||
(compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) ||
|
||||
(compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) ||
|
||||
ScriptTarget.ES3;
|
||||
ScriptTarget.ES5;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
|
||||
Reference in New Issue
Block a user