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

Bart/prelim types #38

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Bart/prelim types #38

merged 5 commits into from
Sep 7, 2021

Conversation

Horusiath
Copy link
Collaborator

This PR adds two things:

  1. Prelim trait which can be used to support preliminary types, useful when you want to ie. create already populated YMap or YArray and nest it into another Y-collection type.
  2. Value enum which is used to return values stored inside of YMap, YArray etc. Previously we used Any for that, but the problem is that Any only represent primitive JSON-like values, and we had no way to return YMap nested inside of another YMap etc. For this reason Value enum allows us to return both primitive types as well as complex ones (maps, arrays, xml elements and text), and operate on them. Value can also be converted into Any if transaction reference was provided.

@dmonad dmonad merged commit 6bcce73 into y-crdt:main Sep 7, 2021
Horusiath pushed a commit to Horusiath/y-crdt that referenced this pull request May 5, 2022
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.

None yet

2 participants