Skip to content

Commit 9a6d66c

Browse files
committed
fix(types): add explicit return type to setTouched
1 parent f4f4384 commit 9a6d66c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/useForm/formContext.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ export function createFormContext<TForm extends FormObject = FormObject, TOutput
8989
setInPath(values, path, cloneDeep(value));
9090
}
9191

92-
function setTouched(value: boolean);
93-
function setTouched<TPath extends Path<TForm>>(path: TPath, value: boolean);
94-
function setTouched<TPath extends Path<TForm>>(pathOrValue: TPath | boolean, valueOrUndefined?: boolean) {
92+
function setTouched(value: boolean): void;
93+
function setTouched<TPath extends Path<TForm>>(path: TPath, value: boolean): void;
94+
function setTouched<TPath extends Path<TForm>>(pathOrValue: TPath | boolean, valueOrUndefined?: boolean): void {
9595
// If the pathOrValue is a boolean, we want to set all touched fields to that value
9696
if (typeof pathOrValue === 'boolean') {
9797
for (const key in touched) {

0 commit comments

Comments
 (0)