-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add missing select types and refactor #191
Conversation
🦋 Changeset detectedLatest commit: 192d48e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #191 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 457 457
=========================================
Hits 457 457 ☔ View full report in Codecov by Sentry. |
Using In kita's tsconfig this is indeed duplicated, but we cannot ensure all users follow our tsconfig. |
To generate a changelog, run https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md |
We have two paths to follow here:
Adding more type tests without a issues we will probably end up with incorrect tests. |
That's a valid point. I'll invest a little bit of time looking for a standard spec that we could use. |
@arthurfiorette I couldn't find any "standard" jsx definition for dom elements rendered on the server. There is a heavy focus (obviously) on client-side specific type definitions that are not good for the context of this library. We should roll our type definitions for now. Ex. The onselect property is often defined as a function and not a string. |
… all types ? means undefined
…PropertyTypes ts option
Awesome! As always, thanks for your work @JacopoPatroclo! Is this ready to merge? |
I think so, maybe a squash merge is necessary to "hide" some "wrong" commits. |
This PR aims to fix this issue
First I've added the missing properties to the select jsx element typescript definition. I've added
autocomplete
and I've noticed that other properties were declared by the FormEvents interface so I've extended the select definition with that interface to avoid duplication.Second I've removed all the duplicated
undefined
. In this case, they should be equivalent to?:
. Let me know @arthurfiorette if you see any issue with this and if I'm missing something.Third I've added another test file that will be used in the future to check that all the types that this library provides are consistent with what is expected.
What still needs to be done: