{ [P in unknown]: XXX } should resolve to { [x: string]: XXX }
This commit is contained in:
parent
f63b61c3f6
commit
79e7700c6b
1 changed files with 1 additions and 1 deletions
|
@ -6431,7 +6431,7 @@ namespace ts {
|
||||||
for (const prop of getPropertiesOfType(modifiersType)) {
|
for (const prop of getPropertiesOfType(modifiersType)) {
|
||||||
addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop);
|
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);
|
addMemberForKeyType(stringType);
|
||||||
}
|
}
|
||||||
if (!keyofStringsOnly && getIndexInfoOfType(modifiersType, IndexKind.Number)) {
|
if (!keyofStringsOnly && getIndexInfoOfType(modifiersType, IndexKind.Number)) {
|
||||||
|
|
Loading…
Reference in a new issue