Skip to content

Commit

Permalink
Fix TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Feb 24, 2024
1 parent 6040f50 commit c98c48f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/types/form/ExitSurveyReasonForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ const INPUT_IDS = {
REASON: 'reason',
} as const;

type ExitSurveyReasonForm = Form<{
[INPUT_IDS.REASON]: ExitReason;
}>;
type ExitSurveyReasonForm = Form<
ValueOf<typeof INPUT_IDS>,
{
[INPUT_IDS.REASON]: ExitReason;
}
>;

export type {ExitSurveyReasonForm, ExitReason};
export default INPUT_IDS;
10 changes: 7 additions & 3 deletions src/types/form/ExitSurveyResponseForm.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import type {ValueOf} from 'type-fest';
import type Form from './Form';

const INPUT_IDS = {
RESPONSE: 'response',
} as const;

type ExitSurveyResponseForm = Form<{
[INPUT_IDS.RESPONSE]: string;
}>;
type ExitSurveyResponseForm = Form<
ValueOf<typeof INPUT_IDS>,
{
[INPUT_IDS.RESPONSE]: string;
}
>;

export type {ExitSurveyResponseForm};
export default INPUT_IDS;

0 comments on commit c98c48f

Please sign in to comment.