« All deprecation guides

Deprecation Guide for Ember.assign

until: 5.0.0
id: ember-polyfills.deprecate-assign

Use of Ember.assign is deprecated. You should replace any calls to Ember.assign with Object.assign or use the object spread operator.

Before:

import { assign } from '@ember/polyfills';

var a = { first: 'Yehuda' };
var b = { last: 'Katz' };
assign(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }

After:

var a = { first: 'Yehuda' };
var b = { last: 'Katz' };
Object.assign(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }