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