Skip to content

Commit

Permalink
Revert "Update x-pack/plugins/reporting/server/usage/decorate_range_s…
Browse files Browse the repository at this point in the history
…tats.ts"

This reverts commit 2704fe7.
  • Loading branch information
tsullivan committed Aug 20, 2021
1 parent d14a1f8 commit 51fa243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/reporting/server/usage/decorate_range_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import { AvailableTotal, ExportType, FeatureAvailabilityMap, RangeStats } from '

const jobTypeIsDeprecated = (jobType: string) => DEPRECATED_JOB_TYPES.includes(jobType);

function getForFeature<T>(
function getForFeature(
range: Partial<RangeStats>,
typeKey: ExportType,
featureAvailability: FeatureAvailabilityMap,
additional?: T
): AvailableTotal & T {
additional?: any
): AvailableTotal & typeof additional {
const isAvailable = (feature: ExportType) => !!featureAvailability[feature];
const jobType = range[typeKey] || { total: 0, ...additional, deprecated: 0 };

Expand Down

0 comments on commit 51fa243

Please sign in to comment.