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

Feature request: Allow Symbols as viewKeys. #31

Open
dylanpyle opened this issue Jan 27, 2021 · 2 comments
Open

Feature request: Allow Symbols as viewKeys. #31

dylanpyle opened this issue Jan 27, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@dylanpyle
Copy link
Member

Haven't dug into the code enough to know if there's a technical reason behind it, but it seems like extending the type of viewKey from string | undefined to at least string | symbol | undefined would be nice!

Use case here is that I have a well-known shared viewKey I'd like to use (i.e. not a resource ID of any kind) and I like Symbols over constant strings.

@dylanpyle
Copy link
Member Author

Realizing one downside is that this won't easily be serializable to/from JSON, so maybe this is harder than just extending the type.

@scotttrinh
Copy link
Contributor

The basic structure is already pretty hard to serialize, so, yeah, kinda tough. Using a string constant seems fine since it's rare you'll share that key outside of your internal application, but if we come up with a good reason to support it, I'm open to PRs!

@scotttrinh scotttrinh added the enhancement New feature or request label Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants