Skip to content

[Types] $useController is not fully generic #10

@reiv

Description

@reiv
$useController<U = T>(props?: Omit<UseControllerProps, 'name' | 'control'>): UseControllerReturn<...>

UseControllerProps needs to be generic or there will be a mismatch on rules.validate, which actually uses T.

Likewise, rules.value (discouraged but exists) and defaultValue resolve to any instead of T.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions