mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
{ [P in unknown]: XXX } should resolve to { [x: string]: XXX }
This commit is contained in:
@@ -6431,7 +6431,7 @@ namespace ts {
|
||||
for (const prop of getPropertiesOfType(modifiersType)) {
|
||||
addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop);
|
||||
}
|
||||
if (modifiersType.flags & TypeFlags.Any || getIndexInfoOfType(modifiersType, IndexKind.String)) {
|
||||
if (modifiersType.flags & TypeFlags.AnyOrUnknown || getIndexInfoOfType(modifiersType, IndexKind.String)) {
|
||||
addMemberForKeyType(stringType);
|
||||
}
|
||||
if (!keyofStringsOnly && getIndexInfoOfType(modifiersType, IndexKind.Number)) {
|
||||
|
||||
Reference in New Issue
Block a user