diff --git a/frontend/src/scenes/experiments/ExperimentView/SecondaryMetricsTable.tsx b/frontend/src/scenes/experiments/ExperimentView/SecondaryMetricsTable.tsx index 843b2f51bdfd4..4b9b03483ac6f 100644 --- a/frontend/src/scenes/experiments/ExperimentView/SecondaryMetricsTable.tsx +++ b/frontend/src/scenes/experiments/ExperimentView/SecondaryMetricsTable.tsx @@ -12,7 +12,7 @@ import { capitalizeFirstLetter } from 'lib/utils' import { filtersToQueryNode } from '~/queries/nodes/InsightQuery/utils/filtersToQueryNode' import { Query } from '~/queries/Query/Query' import { NodeKind } from '~/queries/schema' -import { ExperimentResults, InsightShortId, InsightType } from '~/types' +import { BaseExperimentResults, InsightShortId, InsightType } from '~/types' import { SECONDARY_METRIC_INSIGHT_ID } from '../constants' import { experimentLogic, TabularSecondaryMetricResults } from '../experimentLogic' @@ -219,7 +219,7 @@ export function SecondaryMetricsTable({ const targetResults = secondaryMetricResults?.[idx] const targetResultFilters = targetResults?.filters - const winningVariant = getHighestProbabilityVariant(targetResults as ExperimentResults['result']) + const winningVariant = getHighestProbabilityVariant(targetResults as BaseExperimentResults) if (metric.filters.insight === InsightType.TRENDS) { columns.push({ diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsx index 6296cf481f7e6..705a9c935830e 100644 --- a/frontend/src/scenes/experiments/experimentLogic.tsx +++ b/frontend/src/scenes/experiments/experimentLogic.tsx @@ -26,6 +26,7 @@ import { queryNodeToFilter } from '~/queries/nodes/InsightQuery/utils/queryNodeT import { FunnelsQuery, InsightVizNode, TrendsQuery } from '~/queries/schema' import { ActionFilter as ActionFilterType, + BaseExperimentResults, Breadcrumb, CountPerActorMathType, Experiment, @@ -964,7 +965,7 @@ export const experimentLogic = kea([ ], getHighestProbabilityVariant: [ () => [], - () => (results: ExperimentResults['result'] | null) => { + () => (results: BaseExperimentResults | null) => { if (results) { const maxValue = Math.max(...Object.values(results.probability)) return Object.keys(results.probability).find( diff --git a/frontend/src/types.ts b/frontend/src/types.ts index a583fe34c26d2..1c489f43f59f9 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -2884,7 +2884,7 @@ export interface TrendExperimentVariant { absolute_exposure: number } -interface BaseExperimentResults { +export interface BaseExperimentResults { probability: Record fakeInsightId: string significant: boolean