-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Are you submitting a bug report or a feature request?
bug report/feature request/feature missing that shouldn't be missing?
What is the current behavior?
TypeScript types for createDecorator in v1.3.2 are missing the FormValues generic argument introduced by #39 . I can confirm that they're present when downloading the source bundle from the release on github, but downloading the package bundle from NPM shows them to be missing. The tag in github is correct, so I'm not sure how NPM didn't pick them up...
This is a frustrating issue right now, since the typings of react-final-form reject the unparameterised decorator's types as being incompatible with the parameterised Form's types, so we can't just use the typings as they stand (without suppressing the error).
What is the expected behavior?
The types introduced in #39 should have been in v1.3.2, as noted in the PR and the release notes.
At this point, I think the only path forwards is to tag a new release v1.3.3 that actually includes the types...
Sandbox Link
https://codesandbox.io/s/bold-bogdan-j4qh6?file=/src/App.tsx
What's your environment?
final-form-calculate: 1.3.2
final-form: 4.20.1
Other information
You can confirm that the types are not updated in the package published on NPM by grabbing its url like so:
$ npm view [email protected]
[email protected] | MIT | deps: none | versions: 9
Decorator for calculating field values based on other field values in 🏁 Final Form
https://github.com/final-form/final-form-calculate#readme
dist
.tarball: https://registry.npmjs.org/final-form-calculate/-/final-form-calculate-1.3.2.tgz
.shasum: a5e1908d1aa34eeec6faccdba3fd9516e7fd3d4f
.integrity: sha512-pon2K9yNbyqmF8UTpDvxwhk+Hvqpl8Fm3qgwkHniNAmCQe+6YxB1aw4cBAHzmRc39jGl2bYsvKyabQOIWLtrPg==
.unpackedSize: 23.6 kB
maintainers:
- erikras <[email protected]>
dist-tags:
latest: 1.3.2
published 5 months ago by erikras <[email protected]>
Download the tarball, decompress it and view pacakge/dist/index.d.ts line 26, which lacks the generic type parameter:
export default function createDecorator(
...calculations: Calculation[]
): Decorator
Or by viewing the file on unpkg here: https://unpkg.com/browse/[email protected]/dist/index.d.ts