mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-09 07:30:40 +02:00
25 lines
546 B
TypeScript
25 lines
546 B
TypeScript
import type {
|
|
Control,
|
|
FieldValues,
|
|
UseFormSetValue,
|
|
UseFormWatch
|
|
} from "react-hook-form";
|
|
|
|
export function asAnyControl<T extends FieldValues>(
|
|
control: Control<T>
|
|
): Control<any> {
|
|
return control as Control<any>;
|
|
}
|
|
|
|
export function asAnySetValue<T extends FieldValues>(
|
|
setValue: UseFormSetValue<T>
|
|
): UseFormSetValue<any> {
|
|
return setValue as UseFormSetValue<any>;
|
|
}
|
|
|
|
export function asAnyWatch<T extends FieldValues>(
|
|
watch: UseFormWatch<T>
|
|
): UseFormWatch<any> {
|
|
return watch as UseFormWatch<any>;
|
|
}
|