@@ -17,7 +17,7 @@ import {
1717 DEBUG_INJECTION_FUNCTIONS ,
1818 hasUnknownProperty ,
1919} from '@ember/-internals/metal' ;
20- import Mixin , { applyMixin } from '@ember/object/mixin' ;
20+ import Mixin from '@ember/object/mixin' ;
2121import makeArray from '@ember/array/make' ;
2222import { assert } from '@ember/debug' ;
2323import { DEBUG } from '@glimmer/env' ;
@@ -795,71 +795,6 @@ class CoreObject {
795795 return instance as InstanceType < C > & MergeArray < Args > ;
796796 }
797797
798- /**
799- Augments a constructor's own properties and functions:
800-
801- ```javascript
802- import EmberObject from '@ember/object';
803-
804- const MyObject = EmberObject.extend({
805- name: 'an object'
806- });
807-
808- MyObject.reopenClass({
809- canBuild: false
810- });
811-
812- MyObject.canBuild; // false
813- o = MyObject.create();
814- ```
815-
816- In other words, this creates static properties and functions for the class.
817- These are only available on the class and not on any instance of that class.
818-
819- ```javascript
820- import EmberObject from '@ember/object';
821-
822- const Person = EmberObject.extend({
823- name: '',
824- sayHello() {
825- alert(`Hello. My name is ${this.get('name')}`);
826- }
827- });
828-
829- Person.reopenClass({
830- species: 'Homo sapiens',
831-
832- createPerson(name) {
833- return Person.create({ name });
834- }
835- });
836-
837- let tom = Person.create({
838- name: 'Tom Dale'
839- });
840- let yehuda = Person.createPerson('Yehuda Katz');
841-
842- tom.sayHello(); // "Hello. My name is Tom Dale"
843- yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
844- alert(Person.species); // "Homo sapiens"
845- ```
846-
847- Note that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`
848- variables. They are only valid on `Person`.
849-
850- @method reopenClass
851- @for @ember /object
852- @static
853- @public
854- */
855- static reopenClass < C extends typeof CoreObject > (
856- this : C ,
857- ...mixins : Array < Mixin | Record < string , unknown > >
858- ) : C {
859- applyMixin ( this , mixins ) ;
860- return this ;
861- }
862-
863798 static detect ( obj : unknown ) {
864799 if ( 'function' !== typeof obj ) {
865800 return false ;
0 commit comments