« All deprecation guides

Deprecation Guide for Ember.K

until: 3.0.0
id: code-ember-k-code

Using Ember.K is deprecated in favor of defining a function inline. See RFC #178.

You can use the addon ember-watson to automate the removal of Ember.K from your application.

Example object:

Ember.Object.extend({
  someFun: Ember.K
});

Command:

ember watson:remove-ember-k --empty

The result will be:

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.