mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Check for both 'module' and 'target'.
This commit is contained in:
@@ -18812,7 +18812,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function checkImportMetaProperty(node: MetaProperty) {
|
||||
if (languageVersion < ScriptTarget.ESNext && moduleKind < ModuleKind.ESNext) {
|
||||
if (languageVersion < ScriptTarget.ESNext || moduleKind < ModuleKind.ESNext) {
|
||||
error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options);
|
||||
}
|
||||
const file = getSourceFileOfNode(node);
|
||||
|
||||
Reference in New Issue
Block a user