Add index.d.ts (TypeScript)See original GitHub issue
- react-advanaced-form: 1.4.0
I suggest to add a separate
index.d.ts file for TypeScript annotations.
To provide a more friendly on-boarding for TypeScript users. Also, in relation to #4, this suggestion doesn’t mean to use TypeScript for the library itself. Nothing should change under the hood.
This change is meant to be done gradually. Issue your pull requests to the
master with the changes done to
index.d.ts to get them reviewed.
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
@ell10t Yeah, the problem would be that developer is in charge of the property name under which the value of a field is stored. It would be impossible, and unnecessary, to assume the end field state. There may be, however, some smart usage of generics to achieve this dynamic property behavior.
I will try to read about it, and polish the typings further, so we could publish the first draft somewhere this months.
Sounds good to me.
No rush, just some notes:
- Due to field groups
namechildren aren’t as strict as I would’ve hoped
- I doubt there’s anything we can do about that
- There are a few parts I haven’t looked into properly, for visibility I’ve stuck
// ?at the end of those lines