-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
typescript tests and fixes #8
Conversation
src/index.d.test.ts
Outdated
}) | ||
|
||
// Get form.mutators (default as object) and cast to Mutators | ||
const mutators: Mutators = ((form.mutators || {}) as any) as Mutators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI - This casting is a bit gross, but unless we allow parameterized types in the form and expose it all the way through, this is the way it needs to be done. Parameterized types in jsx is already painful so this is not any worse by any means.
Codecov Report
@@ Coverage Diff @@
## master #8 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 8 8
Lines 48 48
Branches 10 10
=====================================
Hits 48 48 Continue to review full report at Codecov.
|
I need to PR a change to |
I don't have this quite right yet. Please hold and I'll work on it tomorrow. The |
Okay. I upgraded the final-form dep. Let me know when this PR is good to go. |
@erikras This one is good to merge/release |
Published in |
I improved the structure of the typescript exports (now strongly typed) and added tests for all the functions.
I believe I found the problem with #7 in that the package was referring to a
js
file instead of ats
file.@erikras Please try a build and see if the
ts
gets included.Closes #7
Depends on final-form/final-form#68