Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants