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

Circuit value improvements #306

Merged
merged 1 commit into from
Aug 3, 2022
Merged

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Jul 26, 2022

This fixes some issues with CircuitValue

  • It no longer breaks when you declare a constructor with different argument structure than the base constructor. That's because ofFields and fromJSON no longer use new this(...) to instantiate the class
  • There's now a CircuitValue.fromObject method, which is nicely typed (in contrast to the generic constructor). It expects an objects that has the same props as the CircuitValue, but without the methods.

@mitschabaude mitschabaude marked this pull request as ready for review July 26, 2022 15:09
Copy link
Member

@Trivo25 Trivo25 left a comment

Choose a reason for hiding this comment

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

a much needed improvement, makes working with CircuitValues a lot easier!

@mitschabaude mitschabaude merged commit 1ece838 into main Aug 3, 2022
@mitschabaude mitschabaude deleted the feature/better-circuit-value branch August 3, 2022 13:29
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.

2 participants