Skip to content

TS - Form value type does not reflect the runtime value #14

@lakardion

Description

@lakardion

We've had this issue multiple times with Typescript where whenever we want to do form.value before submission we end up needing to coalesce every single possibly undefined value. When this should be something that the library should know out of the current state.
We do have form.isValid to check whether the form is currently valid, however that is not enough to make form.value to have its required values to be defined at the type level. Which is fine, there's nothing that is actually informing TS that the form has become valid and the values should be defined.

My initial thought for this is that we probably need another function (or we could rework the form.value getter) that does the validation check and yields the defined values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions