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

Make Typed contructor idempotent #4560

Open
RenanSouza2 opened this issue Jan 23, 2024 · 1 comment · May be fixed by #4524
Open

Make Typed contructor idempotent #4560

RenanSouza2 opened this issue Jan 23, 2024 · 1 comment · May be fixed by #4524
Labels
enhancement New feature or improvement.

Comments

@RenanSouza2
Copy link

RenanSouza2 commented Jan 23, 2024

Describe the Feature

Change the behaviour of the Typed constructor if another instance of Typed is passed as value

Code Example

const address = ..... // any address|addresssable
const type1 = Typed.address(address) // type1.value == address
const type2 = Typed.address(type1) // type2.value == address

const type3 = Typed.uint256(type1) // throws an error
@RenanSouza2 RenanSouza2 added the enhancement New feature or improvement. label Jan 23, 2024
@RenanSouza2
Copy link
Author

Hey @ricmoo, this is more of an suggestion considering the Typed.dereference is idempotent as well, let me know what you think about it,

Thanks

@RenanSouza2 RenanSouza2 linked a pull request Jan 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant