File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14960,8 +14960,8 @@ namespace ts {
14960
14960
}
14961
14961
// If no inferences can be made to K's constraint, infer from a union of the property types
14962
14962
// in the source to the template type X.
14963
- const indexType = source.symbol && source.symbol.flags & SymbolFlags.Enum && getEnumKind (source.symbol) === EnumKind.Literal ?
14964
- undefined : getIndexTypeOfType(source, IndexKind.String) || getIndexTypeOfType(source, IndexKind.Number) ;
14963
+ const indexInfo = getIndexInfoOfType( source, IndexKind.String) || getIndexInfoOfType (source, IndexKind.Number);
14964
+ const indexType = indexInfo && indexInfo !== enumNumberIndexInfo ? indexInfo.type : undefined ;
14965
14965
const sourcePropsType = indexType || getUnionType(map(getPropertiesOfType(source), getTypeOfSymbol));
14966
14966
inferFromTypes(sourcePropsType, getTemplateTypeFromMappedType(target));
14967
14967
return true;
You can’t perform that action at this time.
0 commit comments