Skip to content

Commit fa65bd2

Browse files
committed
Mapped type { [P in any]: T } should yield { [x: string]: T }
1 parent 07ff0fd commit fa65bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5821,7 +5821,7 @@ namespace ts {
58215821
prop.syntheticLiteralTypeOrigin = t as StringLiteralType;
58225822
members.set(propName, prop);
58235823
}
5824-
else if (t.flags & TypeFlags.String) {
5824+
else if (t.flags & (TypeFlags.Any | TypeFlags.String)) {
58255825
stringIndexInfo = createIndexInfo(propType, templateReadonly);
58265826
}
58275827
}

0 commit comments

Comments
 (0)