diff --git a/src/scenes/ProgressReports/EditForm/Steps/ExplanationOfProgress/ExplanationOfProgress.tsx b/src/scenes/ProgressReports/EditForm/Steps/ExplanationOfProgress/ExplanationOfProgress.tsx index 55393caa40..8ff338b7fe 100644 --- a/src/scenes/ProgressReports/EditForm/Steps/ExplanationOfProgress/ExplanationOfProgress.tsx +++ b/src/scenes/ProgressReports/EditForm/Steps/ExplanationOfProgress/ExplanationOfProgress.tsx @@ -6,7 +6,6 @@ import onFieldChange from 'final-form-calculate'; import { camelCase } from 'lodash'; import { DateTime } from 'luxon'; import { useMemo, useState } from 'react'; -import { RequiredKeysOf } from 'type-fest'; import type { ProgressReportVarianceExplanationReasonOptions as ReasonOptions } from '~/api/schema.graphql'; import { canEditAny } from '~/common'; import { @@ -23,9 +22,11 @@ import { VarianceExplanation } from '../../../Detail/VarianceExplanation/Varianc import { StepComponent } from '../step.types'; import { ExplainProgressVarianceDocument } from './ExplanationOfProgress.graphql'; -type OptionGroup = RequiredKeysOf; +type OptionGroup = typeof groups extends Array ? T : never; -const groups: OptionGroup[] = ['behind', 'onTime', 'ahead']; +const groups = ['behind', 'onTime', 'ahead'] satisfies Array< + keyof ReasonOptions +>; const decorators: Array> = [ onFieldChange({