Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect typing for resetField on useField #3568

Closed
5 tasks done
charleslambert opened this issue Nov 5, 2021 · 1 comment
Closed
5 tasks done

Incorrect typing for resetField on useField #3568

charleslambert opened this issue Nov 5, 2021 · 1 comment
Labels
👕 TypeScript TypeScript typings issue

Comments

@charleslambert
Copy link

What happened?

resetField should have the type

resetField(state?: Partial<FieldState<TValue>>): void;
However the typing for
PrivateFieldContext<TValue>
has the type as
resetField(state?: FieldState<TValue>): void;

In the compiled library the correct typing is superseded by the incorrect typing.

Reproduction steps

Look at the compiled types in vee-validate.d.ts

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://codesandbox.io/s/peaceful-margulis-cubwt?file=/src/main.ts

Code of Conduct

@logaretm logaretm added the 👕 TypeScript TypeScript typings issue label Nov 6, 2021
@logaretm
Copy link
Owner

logaretm commented Nov 6, 2021

Thanks for reporting this, will publish the corrected typings next patch shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👕 TypeScript TypeScript typings issue
Projects
None yet
Development

No branches or pull requests

2 participants