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

Generic Types #41

Merged
merged 10 commits into from
Jun 24, 2019
Merged

Generic Types #41

merged 10 commits into from
Jun 24, 2019

Conversation

Pruxis
Copy link
Collaborator

@Pruxis Pruxis commented Jun 16, 2019

This PR adds generic types to all hooks except useFormConnect.

Fixes: #34

@Pruxis Pruxis self-assigned this Jun 16, 2019
@Pruxis Pruxis requested a review from JoviDeCroock June 16, 2019 13:49
@Pruxis Pruxis added the enhancement New feature or request label Jun 16, 2019
@codecov-io
Copy link

codecov-io commented Jun 16, 2019

Codecov Report

Merging #41 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage    99.5%   99.51%   +<.01%     
==========================================
  Files          14       14              
  Lines         204      207       +3     
  Branches       40       41       +1     
==========================================
+ Hits          203      206       +3     
  Partials        1        1
Impacted Files Coverage Δ
src/useField.ts 100% <100%> (ø) ⬆️
src/useFieldArray.ts 100% <100%> (ø) ⬆️
src/Form.tsx 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bda1b61...e06e868. Read the comment docs.

Copy link
Owner

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking mighty good already, made a few minor comment, also shouldn't we change Field and FieldArray as well?

src/types/ValueOf.ts Outdated Show resolved Hide resolved
src/Form.tsx Show resolved Hide resolved
Pruxis added 3 commits June 18, 2019 20:59
Used partial types in callback methods as we cannot be certain what values are present and which ones are not.
Copy link
Owner

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I'll merge this in, write docs this week and release it by the end of the week

@JoviDeCroock JoviDeCroock merged commit 89b17aa into master Jun 24, 2019
@JoviDeCroock JoviDeCroock deleted the types/generics branch June 24, 2019 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve typings
3 participants