File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -14960,9 +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 indexInfo = getIndexInfoOfType(source, IndexKind.String) || getIndexInfoOfType(source, IndexKind.Number);
14964
- const indexType = indexInfo && indexInfo !== enumNumberIndexInfo ? indexInfo.type : undefined;
14965
- const sourcePropsType = indexType || getUnionType(map(getPropertiesOfType(source), getTypeOfSymbol));
14963
+ const indexInfo = getIndexInfoOfType(source, IndexKind.String) || getNonEnumNumberIndexInfo(source);
14964
+ const sourcePropsType = indexInfo && indexInfo.type || getUnionType(map(getPropertiesOfType(source), getTypeOfSymbol));
14966
14965
inferFromTypes(sourcePropsType, getTemplateTypeFromMappedType(target));
14967
14966
return true;
14968
14967
}
You can’t perform that action at this time.
0 commit comments