mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-19 17:18:50 -06:00
{ [P in unknown]: XXX } should resolve to { [x: string]: XXX }
This commit is contained in:
parent
f63b61c3f6
commit
79e7700c6b
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user