From 7299e24c977cd3fbf2803f5bf13efd9a409c4d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20I=2E=20Silva?= Date: Fri, 23 Dec 2016 01:18:59 -0600 Subject: [PATCH] deprecate Ember.K --- source/deprecations/v2.x.html.md | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/source/deprecations/v2.x.html.md b/source/deprecations/v2.x.html.md index ed3d7ed06e..ce790f857d 100644 --- a/source/deprecations/v2.x.html.md +++ b/source/deprecations/v2.x.html.md @@ -858,3 +858,38 @@ Index Content For more informations of how to use `ember-elsewhere`, please visit the official documentation [here](https://github.com/ef4/ember-elsewhere#ember-elsewhere). + +### Deprecations Added in 2.12 + +#### `Ember.K` + +##### until: 3.0.0 +##### id: ember-metal.ember-k + +Using `Ember.K` is deprecated in favor of defining a function inline. See [RFC 0178](https://github.com/emberjs/rfcs/blob/master/text/0178-deprecate-ember-k.md). + +You can use the addon [ember-watson](https://github.com/abuiles/ember-watson#remove-usages-of-emberk) to automate the removal of `Ember.K` from your application. + +Example object: + +```js +Ember.Object.extend({ + someFun: Ember.K +}); +``` + +Command: + +```sh +ember watson:remove-ember-k --empty +``` + +The result will be: + +```js +Ember.Object.extend({ + someFun() {} +}); +``` + +If for some reason your app depends on the ability to chain `Ember.K` invocations, you can use the flag `--return-this`. It will replace `Ember.K` with a function that returns `this`.