1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00

refactor: fix return type for getFeatureOverviewData (#6750)

Brought up by https://github.com/Unleash/unleash/issues/6738
This commit is contained in:
Jaanus Sellin 2024-04-02 10:36:30 +03:00 committed by GitHub
parent fc43391184
commit 8942cda901
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ function mapInput(input: IFeatureStrategy): IFeatureStrategiesTable {
};
}
const sortEnvironments = (overview: IFeatureOverview) => {
const sortEnvironments = (overview: Record<string, IFeatureOverview>) => {
return Object.values(overview).map((data: IFeatureOverview) => ({
...data,
environments: data.environments
@ -728,7 +728,7 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
}, {});
}
getFeatureOverviewData(rows): IFeatureOverview {
getFeatureOverviewData(rows): Record<string, IFeatureOverview> {
return rows.reduce((acc, row) => {
if (acc[row.feature_name]) {
const environmentExists = acc[