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

Export FieldOptions interface #3843

Closed
TotomInc opened this issue Jul 13, 2022 · 1 comment
Closed

Export FieldOptions interface #3843

TotomInc opened this issue Jul 13, 2022 · 1 comment
Labels
👕 TypeScript TypeScript typings issue

Comments

@TotomInc
Copy link

Is your feature request related to a problem? Please describe.

I would like to create re-usable input components, so I have created a custom wrapper around the useField function.

I need to type my parameters to be the same type of the ones provided by the useField function, but with the advantage of using TypeScript to Pick/Partial/Exclude some properties of the FieldOptions interface.

Describe the solution you'd like

Export the FieldOptions interface so we can import it easily everywhere.

interface FieldOptions<TValue = unknown> {

Describe alternatives you've considered

Copying the interface FieldOptions locally but that would not be reactive in the case when vee-validate update and provided new properties to the interface.

@logaretm logaretm added the 👕 TypeScript TypeScript typings issue label Jul 16, 2022
@logaretm
Copy link
Owner

That makes sense, will publish this in the next patch.

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