Skip to content

Commit

Permalink
fix(types): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Oct 16, 2023
1 parent e3d27f8 commit 392f782
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion collections/forms/types/RadioFieldFF/RadioFieldFF.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { RadioProps } from '@dhis2-ui/radio'

type InputValue = RadioProps['value']

type RadioOverriddenProps = Omit<RadioProps, 'onChange' | 'value' | | 'checked' | 'name'>
type RadioOverriddenProps = Omit<RadioProps, 'onChange' | 'value' | 'checked' | 'name'>

export type RadioFieldFFProps = FieldRenderProps<InputValue> &
RadioOverriddenProps & {
Expand Down
16 changes: 16 additions & 0 deletions collections/forms/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import * as FinalForm from 'final-form'
import * as ReactFinalForm from 'react-final-form'


export { CheckboxFieldFF } from './CheckboxFieldFF/CheckboxFieldFF'
export { FileInputFieldFF } from './FileInputFieldFF/FileInputFieldFF'
Expand All @@ -12,3 +15,16 @@ export { FieldGroupFF } from './FieldGroupFF/FieldGroupFF'
export * from './transformers'
export * from './validators'


/**
* Allows direct access to the FinalForm library. Please note that this is considered advanced
* usage and that you need to stay up to date with breaking changes in the FinalForm library.
*/
export { FinalForm }

/**
* Allows direct access to the ReactFinalForm library. Please note that this is considered
* advanced usage and that you need to stay up to date with breaking changes in the FinalForm
* library.
*/
export { ReactFinalForm }
2 changes: 1 addition & 1 deletion collections/forms/types/transformers/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import type { ValuesWithId } from "../validators"
export type ValuesWithId = Array<{ id: string }> | undefined

export const arrayWithIdObjects: {
format: (value: ValuesWithId) => string,
Expand Down
2 changes: 0 additions & 2 deletions collections/forms/types/validators/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type ValuesWithId = Array<{ id: string }> | undefined

export type Validator = (value: unknown) => string | undefined

export const alphaNumeric: Validator
Expand Down

0 comments on commit 392f782

Please sign in to comment.