-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 deprecate-get-with-default] Deprecate getWithDefault #18993
Conversation
Thank you! It was confusing seeing the docs not show this as deprecated. |
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.
I think we also need to deprecate this.getWithDefault
(I suspect this deprecation does fire in that case, but the docs at least need to be updated):
ember.js/packages/@ember/-internals/runtime/lib/mixins/observable.js
Lines 415 to 423 in fc9afa5
@method getWithDefault | |
@param {String} keyName The name of the property to retrieve | |
@param {Object} defaultValue The value to return if the property value is undefined | |
@return {Object} The property value or the defaultValue. | |
@public | |
*/ | |
getWithDefault(keyName, defaultValue) { | |
return getWithDefault(this, keyName, defaultValue); | |
}, |
…est and computed_test, Add docs for getWithDefault in observable
Ah yeah added the doc here! |
@@ -194,6 +194,7 @@ export function getWithDefault<T extends object, K extends Extract<keyof T, stri | |||
{ | |||
id: 'ember-metal.get-with-default', | |||
until: '4.0.0', | |||
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-metal-get-with-default', |
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 link doesn't work just yet, do we expect it to be live already?
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.
Oh I see, I just merged ember-learn/deprecation-app#600. Once that is published and we can validate the URL is working as expected this should good to go...
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.
Works now! :)
Based on RFC 0554
Also added:
ember-learn/deprecation-app#600