Skip to content

Commit

Permalink
Add return types for util functions
Browse files Browse the repository at this point in the history
  • Loading branch information
praseodym committed Sep 23, 2024
1 parent e38309e commit f8fc6ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/lib/api/form/pollingstation/pollingStationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ function sortFormSections(a: FormSection, b: FormSection): number {
return 0;
}

export function getInitialValues(election: Required<Election>, defaultValues?: Partial<PollingStationValues>) {
export function getInitialValues(
election: Required<Election>,
defaultValues?: Partial<PollingStationValues>,
): PollingStationValues {
return {
recounted: undefined,
voters_counts: {
Expand Down Expand Up @@ -333,7 +336,7 @@ export function getInitialValues(election: Required<Election>, defaultValues?: P
};
}

export function getInitialFormState(election: Required<Election>, defaultFormState?: Partial<FormState>) {
export function getInitialFormState(election: Required<Election>, defaultFormState?: Partial<FormState>): FormState {
const result: FormState = {
active: INITIAL_FORM_SECTION_ID,
current: INITIAL_FORM_SECTION_ID,
Expand Down

0 comments on commit f8fc6ca

Please sign in to comment.