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

Refactor: types/interfaces #627

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Refactor: types/interfaces #627

merged 5 commits into from
Nov 28, 2023

Conversation

carletex
Copy link
Member

Tries to solve a couple of items from (+ general cleanup) #617

  • Remove T prefix on types
  • Change interface to types (when possible)
  • Remove some export from types when they weren't used
  • Some changes on useBurnerWallet: naming (signers => account, comments, typos, etc)

We can add more stuff in this PR (if it's in the same line).

Also, do you remember where was the discussion about viem's Address vs 0x${string}? We are still overriding in abi.d.ts, and would like to give it a second thought.

Thanks!

@technophile-04
Copy link
Collaborator

technophile-04 commented Nov 27, 2023

Also some stuff from #232 (comment):

  • Removing @dev comments since they are not valid JSDoc comments

Also, do you remember where was the discussion about viem's Address vs 0x${string}

maybe are you talking about PR #515 ?

@carletex
Copy link
Member Author

Removing @dev comments since they are not valid JSDoc comments

Oh yes!! Done in 07d1a04

I also tweaked some comments... and thought a bit about the JSDocs comments. Since we are using TS, I feel that some JSDocs annotations are redundant. I personally will only use them if:

  • It's an exported function (it's a user facing hook / function)
  • They add some extra/useful information (besides the function description). It's nice to see how IDEs show that info @param, @return, etc.

I removed some of them in the PR, but applying these rules we could probably remove a bunch more haha.

What do you all think?

maybe are you talking about PR #515 ?

Yesss thanks!!


@technophile-04
Copy link
Collaborator

I also tweaked some comments... and thought a bit about the JSDocs comments. Since we are using TS, I feel that some JSDocs annotations are redundant. I personally will only use them if:

  • It's an exported function (it's a user facing hook / function)
  • They add some extra/useful information (besides the function description). It's nice to see how IDEs show that info @param, @return, etc.

I removed some of them in the PR, but applying these rules we could probably remove a bunch more haha.

💯 agree with this!!! Lol I was planning to mention it in my previous comment to remove stuff like this :

but saw we had lot clean up to do so thought maybe it would be out of scope for this PR and maybe we could have another PR with refactoring JSDoc comments.

@carletex carletex mentioned this pull request Nov 27, 2023
4 tasks
@carletex
Copy link
Member Author

but saw we had lot clean up to do so thought maybe it would be out of scope for this PR and maybe we could have another PR with refactoring JSDoc comments.

Yep, maybe another PR! Added it as a ToDo in #617

Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this, Thanks Carlos 🙌

@technophile-04 technophile-04 merged commit a842409 into main Nov 28, 2023
1 check passed
@technophile-04 technophile-04 deleted the refactor-types branch November 28, 2023 06:35
@github-actions github-actions bot mentioned this pull request Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants