Skip to content

Commit

Permalink
fix: improve types for parseFormValue method
Browse files Browse the repository at this point in the history
  • Loading branch information
gciotola committed Nov 27, 2024
1 parent 170ea68 commit cb2216d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { type InputCurrencyRangeProps } from '#ui/forms/InputCurrencyRange'
import { type InputResourceGroupProps } from '#ui/forms/InputResourceGroup'
import { type QueryFilter } from '@commercelayer/sdk'
import { type ValueOf } from 'type-fest'

export const filterableTimeRangePreset = [
'today',
Expand Down Expand Up @@ -67,7 +69,7 @@ export interface BaseFilterItem {
/**
* Custom function to transform the form value to the SDK value
*/
parseFormValue?: (value: unknown) => string | number | boolean | undefined
parseFormValue?: (value: unknown) => ValueOf<QueryFilter> | undefined
}
}

Expand Down

0 comments on commit cb2216d

Please sign in to comment.