-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(store): add parse logic for variants with extra fields
The V generic is intended for cases when the user keeps their changesets versioned and with a strict policy of only adding fields, not modifying older ones nor removing them. In the case the data has been encoded with a newer version, but is decoded with an older one, the code should attemp to parse only the fields it already knows of, ignoring the rest. This code implements that logic but also opens the door for parsing fields of different types as the wrong type.
- Loading branch information
Showing
2 changed files
with
37 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters