current solution:
fields.number() corresponds to type number | "" to represent empty input value as ""
fields.date() corresponds to type Date | null to represent lack of date
fields.choice() can accept "" to represent empty select input
- other fields do not have dedicated type representing lack of value
this can be confusing and require additional casting of form state to domain models on submit.
research better solution
current solution:
fields.number()corresponds to typenumber | ""to represent empty input value as""fields.date()corresponds to typeDate | nullto represent lack of datefields.choice()can accept""to represent empty select inputthis can be confusing and require additional casting of form state to domain models on submit.
research better solution