diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3b9b9166589..d28d6bc48a1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14876,7 +14876,7 @@ namespace ts { const specifierType = checkExpression(node.specifier); if (!isTypeAssignableTo(specifierType, stringType)) { error(node.specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); - } + } // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal const moduleSymbol = resolveExternalModuleName(node, node.specifier); if (moduleSymbol) {