diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bf33a3aa3ab..f7bd5c8e728 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5251,7 +5251,7 @@ namespace ts { return indexTypesIdenticalTo(IndexKind.String, source, target); } let targetType = getIndexTypeOfType(target, IndexKind.String); - if (targetType) { + if (targetType && !(targetType.flags & TypeFlags.Any)) { let sourceType = getIndexTypeOfType(source, IndexKind.String); if (!sourceType) { if (reportErrors) {