@@ -64,7 +64,7 @@ namespace ts {
6464
6565 const compilerOptions = host.getCompilerOptions();
6666 const languageVersion = getEmitScriptTarget(compilerOptions);
67- const modulekind = getEmitModuleKind(compilerOptions);
67+ const moduleKind = getEmitModuleKind(compilerOptions);
6868 const allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions);
6969 const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks");
7070 const strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes");
@@ -1085,7 +1085,7 @@ namespace ts {
10851085 const declarationFile = getSourceFileOfNode(declaration);
10861086 const useFile = getSourceFileOfNode(usage);
10871087 if (declarationFile !== useFile) {
1088- if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
1088+ if ((moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
10891089 (!compilerOptions.outFile && !compilerOptions.out) ||
10901090 isInTypeQuery(usage) ||
10911091 declaration.flags & NodeFlags.Ambient) {
@@ -18723,7 +18723,7 @@ namespace ts {
1872318723 }
1872418724
1872518725 function checkImportMetaProperty(node: MetaProperty) {
18726- if (languageVersion < ScriptTarget.ESNext && modulekind < ModuleKind.ESNext) {
18726+ if (languageVersion < ScriptTarget.ESNext && moduleKind < ModuleKind.ESNext) {
1872718727 error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options);
1872818728 }
1872918729 const file = getSourceFileOfNode(node);
@@ -22329,7 +22329,7 @@ namespace ts {
2232922329
2233022330 function checkCollisionWithRequireExportsInGeneratedCode(node: Node, name: Identifier) {
2233122331 // No need to check for require or exports for ES6 modules and later
22332- if (modulekind >= ModuleKind.ES2015 || compilerOptions.noEmit) {
22332+ if (moduleKind >= ModuleKind.ES2015 || compilerOptions.noEmit) {
2233322333 return;
2233422334 }
2233522335
@@ -24518,7 +24518,7 @@ namespace ts {
2451824518 }
2451924519 }
2452024520 else {
24521- if (modulekind >= ModuleKind.ES2015 && !(node.flags & NodeFlags.Ambient)) {
24521+ if (moduleKind >= ModuleKind.ES2015 && !(node.flags & NodeFlags.Ambient)) {
2452224522 // Import equals declaration is deprecated in es6 or above
2452324523 grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);
2452424524 }
@@ -24556,7 +24556,7 @@ namespace ts {
2455624556 error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
2455724557 }
2455824558
24559- if (modulekind !== ModuleKind.System && modulekind !== ModuleKind.ES2015 && modulekind !== ModuleKind.ESNext) {
24559+ if (moduleKind !== ModuleKind.System && moduleKind !== ModuleKind.ES2015 && moduleKind !== ModuleKind.ESNext) {
2456024560 checkExternalEmitHelpers(node, ExternalEmitHelpers.ExportStar);
2456124561 }
2456224562 }
@@ -24629,11 +24629,11 @@ namespace ts {
2462924629 }
2463024630
2463124631 if (node.isExportEquals && !(node.flags & NodeFlags.Ambient)) {
24632- if (modulekind >= ModuleKind.ES2015) {
24632+ if (moduleKind >= ModuleKind.ES2015) {
2463324633 // export assignment is not supported in es6 modules
2463424634 grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead);
2463524635 }
24636- else if (modulekind === ModuleKind.System) {
24636+ else if (moduleKind === ModuleKind.System) {
2463724637 // system modules does not support export assignment
2463824638 grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system);
2463924639 }
@@ -27790,7 +27790,7 @@ namespace ts {
2779027790 }
2779127791
2779227792 function checkGrammarImportCallExpression(node: ImportCall): boolean {
27793- if (modulekind === ModuleKind.ES2015) {
27793+ if (moduleKind === ModuleKind.ES2015) {
2779427794 return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
2779527795 }
2779627796
0 commit comments