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

Add deprecation warning for tracked property dependent keys #141

Merged
merged 2 commits into from Sep 18, 2018

Conversation

smfoote
Copy link
Contributor

@smfoote smfoote commented Sep 17, 2018

Step 1 of #139

@@ -89,6 +89,9 @@ export function tracked(...dependencies: any[]): any {

if (typeof target === "string") {
return function(target: any, key: string | Symbol, descriptor: PropertyDescriptor) {
if (dependencies.length) {
console.warn('The use of dependent keys in @tracked is deprecated (e.g. `@tracked(\'myDependendentKey\')`) and will be removed in v0.12.0');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add:

Please remove the "${dependencies.length > 1 ? dependencies.join(', ') : dependencies[0]}" key${dependencies.length > 1 ? 's' : ''}.

@chadhietala chadhietala merged commit efb9c28 into glimmerjs:master Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants