ember-source 4.0.0-beta.4 → 4.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
  3. package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
  4. package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
  5. package/blueprints/helper-test/index.js +4 -22
  6. package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
  7. package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
  8. package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
  9. package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
  10. package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
  11. package/build-metadata.json +3 -3
  12. package/dist/ember-template-compiler.js +87 -421
  13. package/dist/ember-template-compiler.map +1 -1
  14. package/dist/ember-testing.js +1 -1
  15. package/dist/ember-testing.map +1 -1
  16. package/dist/ember.debug.js +32 -770
  17. package/dist/ember.debug.map +1 -1
  18. package/dist/header/license.js +1 -1
  19. package/dist/packages/@ember/-internals/container/index.js +1 -1
  20. package/dist/packages/@ember/-internals/glimmer/index.js +11 -3
  21. package/dist/packages/@ember/-internals/utils/index.js +0 -3
  22. package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
  23. package/dist/packages/@ember/application/lib/application.js +7 -8
  24. package/dist/packages/@ember/engine/index.js +1 -2
  25. package/dist/packages/@ember/object/lib/computed/computed_macros.js +0 -373
  26. package/dist/packages/@ember/object/lib/computed/reduce_computed_macros.js +0 -351
  27. package/dist/packages/ember/index.js +7 -13
  28. package/dist/packages/ember/version.js +1 -1
  29. package/docs/data.json +114 -138
  30. package/lib/index.js +11 -48
  31. package/package.json +17 -17
  32. package/dist/packages/jquery/index.js +0 -2
@@ -5,5 +5,5 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 4.0.0-beta.4
8
+ * @version 4.0.0-beta.8
9
9
  */
@@ -398,7 +398,7 @@ class FactoryManager {
398
398
  this.injections = undefined;
399
399
  setFactoryFor(this, this);
400
400
 
401
- if (factory) {
401
+ if (isInstantiatable(container, fullName)) {
402
402
  setFactoryFor(factory, this);
403
403
  }
404
404
  }
@@ -2019,7 +2019,10 @@ setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
2019
2019
  deprecate('Reopening the Ember.Component super class itself is deprecated. ' + 'Consider alternatives such as installing event listeners on ' + 'the document or add the customizations to specific subclasses.', false, {
2020
2020
  id: 'ember.component.reopen',
2021
2021
  for: 'ember-source',
2022
- since: {},
2022
+ since: {
2023
+ enabled: '3.27.0'
2024
+ },
2025
+ url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
2023
2026
  until: '4.0.0'
2024
2027
  });
2025
2028
  Component._wasReopened = true;
@@ -2037,7 +2040,10 @@ setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
2037
2040
  deprecate('Reopening the Ember.Component super class itself is deprecated. ' + 'Consider alternatives such as installing event listeners on ' + 'the document or add the customizations to specific subclasses.', false, {
2038
2041
  id: 'ember.component.reopen',
2039
2042
  for: 'ember-source',
2040
- since: {},
2043
+ url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
2044
+ since: {
2045
+ enabled: '3.27.0'
2046
+ },
2041
2047
  until: '4.0.0'
2042
2048
  });
2043
2049
  Component._wasReopened = true;
@@ -2070,7 +2076,7 @@ var layout = templateFactory({
2070
2076
  The `checked` attribute of an `Checkbox` object should always be set
2071
2077
  through the Ember object or by interacting with its rendered element
2072
2078
  representation via the mouse, keyboard, or touch. Updating the value of the
2073
- checkbox via jQuery will result in the checked value of the object and its
2079
+ checkbox programmatically will result in the checked value of the object and its
2074
2080
  element losing synchronization.
2075
2081
 
2076
2082
  ## Layout and LayoutName properties
@@ -8002,6 +8008,7 @@ __decorate$3([action], LinkTo.prototype, "click", null); // Deprecated features
8002
8008
  deprecate('Passing the `@disabledWhen` argument to <LinkTo> is deprecated. ' + 'Use the `@disabled` argument instead.', false, {
8003
8009
  id: 'ember.link-to.disabled-when',
8004
8010
  for: 'ember-source',
8011
+ url: 'https://deprecations.emberjs.com/v4.x#toc_ember-link-to-disabled-when',
8005
8012
  since: {},
8006
8013
  until: '4.0.0'
8007
8014
  });
@@ -8023,6 +8030,7 @@ __decorate$3([action], LinkTo.prototype, "click", null); // Deprecated features
8023
8030
  deprecate('Passing the `@disabledWhen` argument to <LinkTo> is deprecated. ' + 'Use the `@disabled` argument instead.', false, {
8024
8031
  id: 'ember.link-to.disabled-when',
8025
8032
  for: 'ember-source',
8033
+ url: 'https://deprecations.emberjs.com/v4.x#toc_ember-link-to-disabled-when',
8026
8034
  since: {},
8027
8035
  until: '4.0.0'
8028
8036
  });
@@ -74,9 +74,6 @@ function isObject(value) {
74
74
  */
75
75
 
76
76
  /**
77
- Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from
78
- jQuery master. We'll just bootstrap our own uuid now.
79
-
80
77
  @private
81
78
  @return {Number} the uuid
82
79
  */
@@ -146,7 +146,7 @@ let mixin = {
146
146
  the target element you are providing is associated with an `Application`
147
147
  and does not have an ancestor element that is associated with an Ember view.
148
148
  @method appendTo
149
- @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object
149
+ @param {String|DOMElement} A selector, element, HTML string
150
150
  @return {Ember.View} receiver
151
151
  @private
152
152
  */
@@ -172,8 +172,8 @@ let mixin = {
172
172
  })());
173
173
  } else {
174
174
  target = selector;
175
- assert(`You tried to append to a selector string (${selector}) in an environment without jQuery`, typeof target !== 'string');
176
- assert(`You tried to append to a non-Element (${selector}) in an environment without jQuery`, typeof selector.appendChild === 'function');
175
+ assert(`You tried to append to a selector string (${selector}) in an environment without a DOM`, typeof target !== 'string');
176
+ assert(`You tried to append to a non-Element (${selector}) in an environment without a DOM`, typeof selector.appendChild === 'function');
177
177
  }
178
178
 
179
179
  this.renderer.appendTo(this, target);
@@ -303,7 +303,7 @@ let mixin = {
303
303
  Component properties that depend on the presence of an outer element, such
304
304
  as `classNameBindings` and `attributeBindings`, do not work with tagless
305
305
  components. Tagless components cannot implement methods to handle events,
306
- and have no associated jQuery object to return with `$()`.
306
+ and their `element` property has a `null` value.
307
307
  @property tagName
308
308
  @type String
309
309
  @default null
@@ -110,7 +110,7 @@ import { RouterService } from '@ember/-internals/routing';
110
110
  });
111
111
  ```
112
112
 
113
- The `rootElement` can be either a DOM element or a jQuery-compatible selector
113
+ The `rootElement` can be either a DOM element or a CSS selector
114
114
  string. Note that *views appended to the DOM outside the root element will
115
115
  not receive events.* If you specify a custom root element, make sure you only
116
116
  append views inside it!
@@ -174,8 +174,7 @@ import { RouterService } from '@ember/-internals/routing';
174
174
  const Application = Engine.extend({
175
175
  /**
176
176
  The root DOM element of the Application. This can be specified as an
177
- element or a
178
- [jQuery-compatible selector string](http://api.jquery.com/category/selectors/).
177
+ element or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).
179
178
  This is the element that will be passed to the Application's,
180
179
  `eventDispatcher`, which sets up the listeners for event delegation. Every
181
180
  view in your application should be a child of the element you specify here.
@@ -481,10 +480,10 @@ const Application = Engine.extend({
481
480
  import Application from '@ember/application';
482
481
  let App = Application.create();
483
482
  App.deferReadiness();
484
- // $ is a reference to the jQuery object/function
485
- import $ from 'jquery;
486
- $.getJSON('/auth-token', function(token) {
487
- App.token = token;
483
+ fetch('/auth-token')
484
+ .then(response => response.json())
485
+ .then(data => {
486
+ App.token = data.token;
488
487
  App.advanceReadiness();
489
488
  });
490
489
  ```
@@ -831,7 +830,7 @@ const Application = Engine.extend({
831
830
  in the non-browser environment, the stand-in `document` object only needs to
832
831
  implement a limited subset of the full DOM API. The `SimpleDOM` library is known
833
832
  to work.
834
- Since there is no access to jQuery in the non-browser environment, you must also
833
+ Since there is no DOM access in the non-browser environment, you must also
835
834
  specify a DOM `Element` object in the same `document` for the `rootElement` option
836
835
  (as opposed to a selector string like `"body"`).
837
836
  See the documentation on the `isBrowser`, `document` and `rootElement` properties
@@ -292,7 +292,6 @@ Engine.reopenClass({
292
292
  and after.
293
293
  Example instanceInitializer to preload data into the store.
294
294
  ```app/initializer/preload-data.js
295
- import $ from 'jquery';
296
295
  export function initialize(application) {
297
296
  var userConfig, userConfigEncoded, store;
298
297
  // We have a HTML escaped JSON representation of the user's basic
@@ -303,7 +302,7 @@ Engine.reopenClass({
303
302
  // like all local models and data can be manipulated by the user, so it
304
303
  // should not be relied upon for security or authorization.
305
304
  // Grab the encoded data from the meta tag
306
- userConfigEncoded = $('head meta[name=app-user-config]').attr('content');
305
+ userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');
307
306
  // Unescape the text, then parse the resulting JSON into a real object
308
307
  userConfig = JSON.parse(unescape(userConfigEncoded));
309
308
  // Lookup the store
@@ -67,25 +67,6 @@ function generateComputedWithPredicate(name, predicate) {
67
67
  todoList.isDone; // true
68
68
  ```
69
69
 
70
- Classic Class Example:
71
-
72
- ```javascript
73
- import EmberObject, { set } from '@ember/object';
74
- import { empty } from '@ember/object/computed';
75
-
76
- let ToDoList = EmberObject.extend({
77
- isDone: empty('todos')
78
- });
79
-
80
- let todoList = ToDoList.create({
81
- todos: ['Unit Test', 'Documentation', 'Release']
82
- });
83
-
84
- todoList.isDone; // false
85
- set(todoList, 'todos', []);
86
- todoList.isDone; // true
87
- ```
88
-
89
70
  @since 1.6.0
90
71
  @method empty
91
72
  @static
@@ -132,25 +113,6 @@ export function empty(dependentKey) {
132
113
  hamster.hasStuff; // false
133
114
  ```
134
115
 
135
- Classic Class Example:
136
-
137
- ```javascript
138
- import EmberObject, { set } from '@ember/object';
139
- import { notEmpty } from '@ember/object/computed';
140
-
141
- let Hamster = EmberObject.extend({
142
- hasStuff: notEmpty('backpack')
143
- });
144
-
145
- let hamster = Hamster.create({
146
- backpack: ['Food', 'Sleeping Bag', 'Tent']
147
- });
148
-
149
- hamster.hasStuff; // true
150
- set(hamster, 'backpack', []);
151
- hamster.hasStuff; // false
152
- ```
153
-
154
116
  @method notEmpty
155
117
  @static
156
118
  @for @ember/object/computed
@@ -190,27 +152,6 @@ export function notEmpty(dependentKey) {
190
152
  hamster.isHungry; // true
191
153
  ```
192
154
 
193
- Classic Class Example:
194
-
195
- ```javascript
196
- import EmberObject, { set } from '@ember/object';
197
- import { none } from '@ember/object/computed';
198
-
199
- let Hamster = EmberObject.extend({
200
- isHungry: none('food')
201
- });
202
-
203
- let hamster = Hamster.create();
204
-
205
- hamster.isHungry; // true
206
-
207
- set(hamster, 'food', 'Banana');
208
- hamster.isHungry; // false
209
-
210
- set(hamster, 'food', null);
211
- hamster.isHungry; // true
212
- ```
213
-
214
155
  @method none
215
156
  @static
216
157
  @for @ember/object/computed
@@ -249,25 +190,6 @@ export function none(dependentKey) {
249
190
  user.isAnonymous; // false
250
191
  ```
251
192
 
252
- Classic Class Example:
253
-
254
- ```javascript
255
- import EmberObject, { set } from '@ember/object';
256
- import { not } from '@ember/object/computed';
257
-
258
- let User = EmberObject.extend({
259
- loggedIn: false,
260
-
261
- isAnonymous: not('loggedIn')
262
- });
263
-
264
- let user = User.create();
265
-
266
- user.isAnonymous; // true
267
- set(user, 'loggedIn', true);
268
- user.isAnonymous; // false
269
- ```
270
-
271
193
  @method not
272
194
  @static
273
195
  @for @ember/object/computed
@@ -312,31 +234,6 @@ export function not(dependentKey) {
312
234
  hamster.hasBananas; // false
313
235
  ```
314
236
 
315
- Classic Class Example:
316
-
317
- ```javascript
318
- import EmberObject, { set } from '@ember/object';
319
- import { bool } from '@ember/object/computed';
320
-
321
-
322
- let Hamster = EmberObject.extend({
323
- hasBananas: bool('numBananas')
324
- });
325
-
326
- let hamster = Hamster.create();
327
-
328
- hamster.hasBananas; // false
329
-
330
- set(hamster, 'numBananas', 0);
331
- hamster.hasBananas; // false
332
-
333
- set(hamster, 'numBananas', 1);
334
- hamster.hasBananas; // true
335
-
336
- set(hamster, 'numBananas', null);
337
- hamster.hasBananas; // false
338
- ```
339
-
340
237
  @method bool
341
238
  @static
342
239
  @for @ember/object/computed
@@ -378,27 +275,6 @@ export function bool(dependentKey) {
378
275
  user.hasValidEmail; // true
379
276
  ```
380
277
 
381
- Classic Class Example:
382
-
383
- ```javascript
384
- import EmberObject, { set } from '@ember/object';
385
- import { match } from '@ember/object/computed';
386
-
387
- let User = EmberObject.extend({
388
- hasValidEmail: match('email', /^.+@.+\..+$/)
389
- });
390
-
391
- let user = User.create();
392
-
393
- user.hasValidEmail; // false
394
-
395
- set(user, 'email', '');
396
- user.hasValidEmail; // false
397
-
398
- set(user, 'email', 'ember_hamster@example.com');
399
- user.hasValidEmail; // true
400
- ```
401
-
402
278
  @method match
403
279
  @static
404
280
  @for @ember/object/computed
@@ -441,27 +317,6 @@ export function match(dependentKey, regexp) {
441
317
  hamster.satisfied; // false
442
318
  ```
443
319
 
444
- Classic Class Example:
445
-
446
- ```javascript
447
- import EmberObject, { set } from '@ember/object';
448
- import { equal } from '@ember/object/computed';
449
-
450
- let Hamster = EmberObject.extend({
451
- satisfied: equal('percentCarrotsEaten', 100)
452
- });
453
-
454
- let hamster = Hamster.create();
455
-
456
- hamster.satisfied; // false
457
-
458
- set(hamster, 'percentCarrotsEaten', 100);
459
- hamster.satisfied; // true
460
-
461
- set(hamster, 'percentCarrotsEaten', 50);
462
- hamster.satisfied; // false
463
- ```
464
-
465
320
  @method equal
466
321
  @static
467
322
  @for @ember/object/computed
@@ -503,27 +358,6 @@ export function equal(dependentKey, value) {
503
358
  hamster.hasTooManyBananas; // true
504
359
  ```
505
360
 
506
- Classic Class Example:
507
-
508
- ```javascript
509
- import EmberObject, { set } from '@ember/object';
510
- import { gt } from '@ember/object/computed';
511
-
512
- let Hamster = EmberObject.extend({
513
- hasTooManyBananas: gt('numBananas', 10)
514
- });
515
-
516
- let hamster = Hamster.create();
517
-
518
- hamster.hasTooManyBananas; // false
519
-
520
- set(hamster, 'numBananas', 3);
521
- hamster.hasTooManyBananas; // false
522
-
523
- set(hamster, 'numBananas', 11);
524
- hamster.hasTooManyBananas; // true
525
- ```
526
-
527
361
  @method gt
528
362
  @static
529
363
  @for @ember/object/computed
@@ -565,27 +399,6 @@ export function gt(dependentKey, value) {
565
399
  hamster.hasTooManyBananas; // true
566
400
  ```
567
401
 
568
- Classic Class Example:
569
-
570
- ```javascript
571
- import EmberObject, { set } from '@ember/object';
572
- import { gte } from '@ember/object/computed';
573
-
574
- let Hamster = EmberObject.extend({
575
- hasTooManyBananas: gte('numBananas', 10)
576
- });
577
-
578
- let hamster = Hamster.create();
579
-
580
- hamster.hasTooManyBananas; // false
581
-
582
- set(hamster, 'numBananas', 3);
583
- hamster.hasTooManyBananas; // false
584
-
585
- set(hamster, 'numBananas', 10);
586
- hamster.hasTooManyBananas; // true
587
- ```
588
-
589
402
  @method gte
590
403
  @static
591
404
  @for @ember/object/computed
@@ -627,27 +440,6 @@ export function gte(dependentKey, value) {
627
440
  hamster.needsMoreBananas; // true
628
441
  ```
629
442
 
630
- Classic Class Example:
631
-
632
- ```javascript
633
- import EmberObject, { set } from '@ember/object';
634
- import { lt } from '@ember/object/computed';
635
-
636
- let Hamster = EmberObject.extend({
637
- needsMoreBananas: lt('numBananas', 3)
638
- });
639
-
640
- let hamster = Hamster.create();
641
-
642
- hamster.needsMoreBananas; // true
643
-
644
- set(hamster, 'numBananas', 3);
645
- hamster.needsMoreBananas; // false
646
-
647
- set(hamster, 'numBananas', 2);
648
- hamster.needsMoreBananas; // true
649
- ```
650
-
651
443
  @method lt
652
444
  @static
653
445
  @for @ember/object/computed
@@ -689,27 +481,6 @@ export function lt(dependentKey, value) {
689
481
  hamster.needsMoreBananas; // true
690
482
  ```
691
483
 
692
- Classic Class Example:
693
-
694
- ```javascript
695
- import EmberObject, { set } from '@ember/object';
696
- import { lte } from '@ember/object/computed';
697
-
698
- let Hamster = EmberObject.extend({
699
- needsMoreBananas: lte('numBananas', 3)
700
- });
701
-
702
- let hamster = Hamster.create();
703
-
704
- hamster.needsMoreBananas; // true
705
-
706
- set(hamster, 'numBananas', 5);
707
- hamster.needsMoreBananas; // false
708
-
709
- set(hamster, 'numBananas', 3);
710
- hamster.needsMoreBananas; // true
711
- ```
712
-
713
484
  @method lte
714
485
  @static
715
486
  @for @ember/object/computed
@@ -762,34 +533,6 @@ export function lte(dependentKey, value) {
762
533
  tomster.readyForHike; // null
763
534
  ```
764
535
 
765
- Classic Class Example:
766
-
767
- ```javascript
768
- import EmberObject, { set } from '@ember/object';
769
- import { and } from '@ember/object/computed';
770
-
771
- let Hamster = EmberObject.extend({
772
- readyForCamp: and('hasTent', 'hasBackpack'),
773
- readyForHike: and('hasWalkingStick', 'hasBackpack')
774
- });
775
-
776
- let tomster = Hamster.create();
777
-
778
- tomster.readyForCamp; // false
779
-
780
- set(tomster, 'hasTent', true);
781
- tomster.readyForCamp; // false
782
-
783
- set(tomster, 'hasBackpack', true);
784
- tomster.readyForCamp; // true
785
-
786
- set(tomster, 'hasBackpack', 'Yes');
787
- tomster.readyForCamp; // 'Yes'
788
-
789
- set(tomster, 'hasWalkingStick', null);
790
- tomster.readyForHike; // null
791
- ```
792
-
793
536
  @method and
794
537
  @static
795
538
  @for @ember/object/computed
@@ -833,31 +576,6 @@ export const and = generateComputedWithPredicate('and', value => value);
833
576
  tomster.readyForBeach; // 'Check'
834
577
  ```
835
578
 
836
- Classic Class Example:
837
-
838
- ```javascript
839
- import EmberObject, { set } from '@ember/object';
840
- import { or } from '@ember/object/computed';
841
-
842
- let Hamster = EmberObject.extend({
843
- readyForRain: or('hasJacket', 'hasUmbrella'),
844
- readyForBeach: or('hasSunscreen', 'hasUmbrella')
845
- });
846
-
847
- let tomster = Hamster.create();
848
-
849
- tomster.readyForRain; // undefined
850
-
851
- set(tomster, 'hasUmbrella', true);
852
- tomster.readyForRain; // true
853
-
854
- set(tomster, 'hasJacket', 'Yes');
855
- tomster.readyForRain; // 'Yes'
856
-
857
- set(tomster, 'hasSunscreen', 'Check');
858
- tomster.readyForBeach; // 'Check'
859
- ```
860
-
861
579
  @method or
862
580
  @static
863
581
  @for @ember/object/computed
@@ -894,27 +612,6 @@ export const or = generateComputedWithPredicate('or', value => !value);
894
612
  alex.name; // '@machty'
895
613
  ```
896
614
 
897
- Classic Class Example:
898
-
899
- ```javascript
900
- import EmberObject, { set } from '@ember/object';
901
- import { alias } from '@ember/object/computed';
902
-
903
- let Person = EmberObject.extend({
904
- name: 'Alex Matchneer',
905
-
906
- nomen: alias('name')
907
- });
908
-
909
- let alex = Person.create();
910
-
911
- alex.nomen; // 'Alex Matchneer'
912
- alex.name; // 'Alex Matchneer'
913
-
914
- set(alex, 'nomen', '@machty');
915
- alex.name; // '@machty'
916
- ```
917
-
918
615
  @method alias
919
616
  @static
920
617
  @for @ember/object/computed
@@ -955,31 +652,6 @@ export const or = generateComputedWithPredicate('or', value => !value);
955
652
  teddy.nickName; // 'TeddyBear'
956
653
  ```
957
654
 
958
- Classic Class Example:
959
-
960
- ```javascript
961
- import EmberObject, { set } from '@ember/object';
962
- import { oneWay } from '@ember/object/computed';
963
-
964
- let User = EmberObject.extend({
965
- firstName: null,
966
- lastName: null,
967
-
968
- nickName: oneWay('firstName')
969
- });
970
-
971
- let teddy = User.create({
972
- firstName: 'Teddy',
973
- lastName: 'Zeenny'
974
- });
975
-
976
- teddy.nickName; // 'Teddy'
977
-
978
- set(teddy, 'nickName', 'TeddyBear'); // 'TeddyBear'
979
- teddy.firstName; // 'Teddy'
980
- teddy.nickName; // 'TeddyBear'
981
- ```
982
-
983
655
  @method oneWay
984
656
  @static
985
657
  @for @ember/object/computed
@@ -1039,32 +711,6 @@ export function oneWay(dependentKey) {
1039
711
  teddy.firstName; // 'Teddy'
1040
712
  ```
1041
713
 
1042
- Classic Class Example:
1043
-
1044
- ```javascript
1045
- import EmberObject, { set } from '@ember/object';
1046
- import { readOnly } from '@ember/object/computed';
1047
-
1048
- let User = EmberObject.extend({
1049
- firstName: null,
1050
- lastName: null,
1051
-
1052
- nickName: readOnly('firstName')
1053
- });
1054
-
1055
- let teddy = User.create({
1056
- firstName: 'Teddy',
1057
- lastName: 'Zeenny'
1058
- });
1059
-
1060
- teddy.nickName; // 'Teddy'
1061
-
1062
- set(teddy, 'nickName', 'TeddyBear'); // throws Exception
1063
- // throw new EmberError('Cannot Set: nickName on: <User:ember27288>' );`
1064
-
1065
- teddy.firstName; // 'Teddy'
1066
- ```
1067
-
1068
714
  @method readOnly
1069
715
  @static
1070
716
  @for @ember/object/computed
@@ -1104,25 +750,6 @@ export function readOnly(dependentKey) {
1104
750
  hamster.cavendishCount; // 5
1105
751
  ```
1106
752
 
1107
- Classic Class Example:
1108
-
1109
- ```javascript
1110
- import EmberObject, { set } from '@ember/object';
1111
- import { deprecatingAlias } from '@ember/object/computed';
1112
-
1113
- let Hamster = EmberObject.extend({
1114
- bananaCount: deprecatingAlias('cavendishCount', {
1115
- id: 'hamster.deprecate-banana',
1116
- until: '3.0.0'
1117
- })
1118
- });
1119
-
1120
- let hamster = Hamster.create();
1121
-
1122
- set(hamster, 'bananaCount', 5); // Prints a deprecation warning.
1123
- hamster.cavendishCount; // 5
1124
- ```
1125
-
1126
753
  @method deprecatingAlias
1127
754
  @static
1128
755
  @for @ember/object/computed