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

Clarify the cases using number, bigint or symbol as key #698

Open
LongTengDao opened this issue Nov 17, 2020 · 2 comments
Open

Clarify the cases using number, bigint or symbol as key #698

LongTengDao opened this issue Nov 17, 2020 · 2 comments

Comments

@LongTengDao
Copy link

Vue 2 doc had add symbol for key api in version 2.5.12

In Vue 3 doc, key is still number | string.

  1. Is symbol deprecated? Or just not implement yet?
  2. Will bigint be supported?
  3. Is 1 treated as same key to "1"? Whether is or not, is it intended?
@skirtles-code
Copy link
Contributor

I've opened an issue against the main repo to get clarification about what the expected behaviour is:

vuejs/core#2633

I believe the TS definitions currently only allow number | string but, in my opinion, that's overly restrictive. If the TS definitions are updated then the docs can follow.

@LongTengDao
Copy link
Author

I'm not sure that's a bug or feature, so I didn't ask in vue-next. I even have no idea it belong to Vue 2 / 3 / 2&3...

Problem more than restrictive is that, if support all these types, they will be use as it is, or stringify any type (except symbol) to string firstly?

I can study the soure, but I'm not sure that's intended and stable.

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

No branches or pull requests

2 participants