Skip to content

Commit

Permalink
fix(types): remove aggressive deep readonly type
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Jul 3, 2023
1 parent ab6a5ae commit 2f9ca91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-phones-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vee-validate': patch
---

fix(types): remove deep readonly type for now
4 changes: 2 additions & 2 deletions packages/vee-validate/src/types/forms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComputedRef, DeepReadonly, Ref, MaybeRef, MaybeRefOrGetter } from 'vue';
import { ComputedRef, Ref, MaybeRef, MaybeRefOrGetter } from 'vue';
import { MapValuesPathsToRefs, GenericObject, MaybeArray, MaybePromise } from './common';
import { FieldValidationMetaInfo } from '../../../shared';
import { Path, PathValue } from './paths';
Expand Down Expand Up @@ -315,7 +315,7 @@ export interface FormContext<TValues extends GenericObject = GenericObject, TOut
| 'keepValuesOnUnmount'
| 'values'
> {
values: DeepReadonly<TValues>;
values: TValues;
handleReset: () => void;
submitForm: (e?: unknown) => Promise<void>;
defineComponentBinds<
Expand Down
2 changes: 1 addition & 1 deletion packages/vee-validate/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ export function useForm<

return {
...formCtx,
values: readonly(formValues),
values: readonly(formValues) as TValues,
handleReset: () => resetForm(),
submitForm,
defineComponentBinds,
Expand Down

0 comments on commit 2f9ca91

Please sign in to comment.