-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Observable decorator on computed symbol keys #2175
Conversation
Tests are now passing, including the new one for computed symbol property keys. If we think this is a good idea, I'll finish up this PR with changelog updates, etc. |
Btw there seems to be quite a lot of functions/objects expecting |
I started going down this path but due to the TS limitation around using symbols as index keys, we'd end up having to cast it back to string everywhere to avoid TS compile errors. After TS patches that limitation, I think it'd be a good idea to use the |
Published as 5.15.0 |
Resolves #2159
I added a new test in
typescript-tests
that tries to use computed property keys... see test#2159 - computed property keys
. Please validate this test is a supported use case (I think it is). It was failing before this change (see original issue for details). By the way, I verified the test passes if the key isn't a computed symbol to make sure the test itself is true.Changed
decorators.ts
andobservable.ts
to apply their logic to symbol keyed properties in addition to string keyed properties.PR checklist:
Updated/docs
. For new functionality, at leastAPI.md
should be updatedI don't think this fix needs any doc updates.
Added typescript typingsAs all changes were made in TS files, no need.
npm run perf
)Note: I didn't see
npm run perf
but I tried outnpm run test:performance
Current develop branch: 66.22 real 67.58 user
This PR: 62.46 real 63.76 user