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

Fix: Rewrite types definitions #28

Merged
merged 9 commits into from
Feb 25, 2022
Merged

Fix: Rewrite types definitions #28

merged 9 commits into from
Feb 25, 2022

Conversation

kamikazebr
Copy link
Member

@kamikazebr kamikazebr commented Jan 7, 2022

List all componens name and status if already converted to ts

https://hackmd.io/y33nfwoTSAiPIm4Efo9kUQ

Aproxx 250 components, all done first phase!

  • Phase 1 - fix autogenerated - make params optionals
  • Remove apiExtractor
  • Configure to send types to distr folder.

The others phase can be done in nexts PRs

- [ ] Phase 2 - look each component source code and export better types

Waiting for 1Hive/gardens-ui#796

How test?

  1. Run yarn build
  2. Copy the ./dist/types/index.d.ts to your gardens-ui project. (eg: gardens-ui/node_modules/@1hive/1hive-ui/dist/types/index.d.ts
  3. Run yarn build the gardens-ui project
  4. Celebrate!

@kamikazebr kamikazebr self-assigned this Jan 7, 2022
@kamikazebr kamikazebr marked this pull request as ready for review January 28, 2022 20:22
package.json Outdated Show resolved Hide resolved
Copy link
Member

@0xGabi 0xGabi 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, we are doing some tests on a website written in typescript that is working better than the current version that gives problems with components that have props that are required and they should be optional. So I think we can go ahead and merge this.

I also did an overview of the index.d.ts file and looks fine. I wonder if we could prevent having a super big diff. But I guess not many alternatives.

package.json Outdated Show resolved Hide resolved
src/components/AddressField/AddressField.js Show resolved Hide resolved
@0xGabi 0xGabi merged commit 6844bcc into master Feb 25, 2022
@0xGabi 0xGabi deleted the fix/rewrite-types branch February 25, 2022 04:55
@kamikazebr
Copy link
Member Author

kamikazebr commented Feb 26, 2022

I wonder if we could prevent having a super big diff. But I guess not many alternatives.

It's possible split it to each component, the first version using autogenerated made that, so its possible.

Knowing that, we will need split each typed component by file and import (merging) in one in index.dt.s in the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants