-
Notifications
You must be signed in to change notification settings - Fork 403
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
feat(storage-plugin): use state classes as keys #1380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best!!!
Thanks man ❤️ The only thing I don't like is |
@markwhitfeld please review it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Just a few small cosmetic tweaks.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Foreword ❗
The
key
option was very unclear for most of our users. Most people got confused of what the heck is this option and how to use. That's why we had some issues and I made PRs to improve documentation.This PR scatters cloud and gives our users the ability to provide state classes except of strings. For sure it's still possible to provide strings as this might be a breaking change.
This feature is a good alternative as it's preferred to have state keys only in one place.
It could seem like there is a lot of code added, but no. I moved token factories to the separate
internals.ts
file, becausestorage.module.ts
file became bigger and bigger. I've only added thetransformKeyOption
function that retrieves state metadatas from state classes.So the compiled code is still very small.