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

Published version of types lacking pristine/isPristine? #126

Closed
joshuaaron opened this issue Feb 26, 2020 · 2 comments
Closed

Published version of types lacking pristine/isPristine? #126

joshuaaron opened this issue Feb 26, 2020 · 2 comments
Milestone

Comments

@joshuaaron
Copy link

joshuaaron commented Feb 26, 2020

Not sure if it's an error on my end, but have updated to 0.12.1.
The published index.d.ts inside react-use-form-state/dist doesn't have the pristine or isPristine properties on the formState object:

// Type definitions for react-use-form-state 0.12.1
// ...
interface FormState<T, E = StateErrors<T, string>> {
  values: StateValues<T>;
  validity: StateValidity<T>;
  touched: StateValidity<T>;
  errors: E;
  reset(): void;
  clear(): void;
  setField<K extends keyof T>(name: K, value: T[K]): void;
  setFieldError(name: keyof T, error: string): void;
  clearField(name: keyof T): void;
  resetField(name: keyof T): void;
}

Would you be able to assist? I saw that they're added on the src/index.d.ts inside the repo however.

@wsmd
Copy link
Owner

wsmd commented Feb 26, 2020

Hi @joshuaaron

The pristine functionality isn't quite ready for release yet (but it should be very soon). I have to admit that I was planning on a new release long time ago, but life got busy!

Thanks for the nudge though. I'll try to get back to this very soon, so stay tuned!

The master branch doesn't always reflect the latest release. The latest release is 0.12.1: https://github.com/wsmd/react-use-form-state/tree/0.12.1 (this link shows the proper documentation). Sorry for the confusion.

@wsmd wsmd closed this as completed Feb 26, 2020
@joshuaaron
Copy link
Author

@wsmd No worries.
Very much looking forward to it being released, it will simplify a bunch of our form validation.

Thanks for the work.

@wsmd wsmd added this to the 0.13.0 milestone May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants