fix: deprecate functions in object.ts #6387
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
npm run format
andnpm run lint
The details
Resolves
Part of #6325.
Proposed Changes
object.values
.object.values
andobject.inherits
as deprecated, with removal dates.Object.values
directly inshortcut_registry.js
.Behavior Before Change
No change.
Behavior After Change
No change
Reason for Changes
Remove workaround and deprecate unused code in preparation for removal.
Improve types!
Test Coverage
Tested by opening up the playground and trying to register shortcuts with modifiers that do and don't exist:
Functional cases:
Same as above, but not using the enum.
Broken case:
Documentation
None.
Additional Information
After discussion we decided to use the next major version instead of a date.
If this deprecation breaks you: you can use
Object.values
instead ofobject.values
, but may need to cast the result toany
or fix any type issues this reveals. You can use standard inheritance in JS or TS instead of our implementation ofobject.inherits
.