mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 10:43:51 -05:00
Don't require index signature when target index signature type is any
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user