Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.83 KB

0750-deprecate-ember-assign.md

File metadata and controls

62 lines (42 loc) · 1.83 KB
stage start-date release-date release-versions teams prs project-link
recommended
2021-05-26 00:00:00 UTC
2021-11-15 00:00:00 UTC
ember-source
v4.0.0
framework
accepted

Deprecate Ember.assign

Summary

Now that Ember is dropping support for IE11, we no longer need Ember.assign as a polyfill since Object.assign is available in all browsers that Ember v4.x supports (CanIUse, MDN).

Motivation

The polyfill is no longer necessary, as well as being another Emberism that can be removed. Apps and addons can use Object.assign or object destructuring depending on their browser support targets.

Transition Path

The transition path is relatively simple: apps that use Ember 4.x will replace Ember.assign with Object.assign, and apps and addons that use or support Ember 3.x can continue to use the polyfill if needed.

ex:

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

const assign = Object.assign || emberAssign;

How We Teach This

A descriptive deprecation message alerting a developer that Ember.assign is deprecated and can be replaced with Object.assign.

Drawbacks

The only drawback is replacing the polyfill assign with the native assign, but there is minimal effort to do this.

Alternatives

Doing nothing.

Unresolved questions

None.