@@ -39,12 +39,7 @@ export {
39
39
*/
40
40
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
41
41
interface EmberObject extends Observable { }
42
- class EmberObject extends CoreObject . extend ( Observable ) {
43
- get _debugContainerKey ( ) {
44
- let factory = getFactoryFor ( this ) ;
45
- return factory !== undefined && factory . fullName ;
46
- }
47
- }
42
+ class EmberObject extends CoreObject . extend ( Observable ) { }
48
43
49
44
export default EmberObject ;
50
45
@@ -266,46 +261,4 @@ export function observer<T extends AnyFn>(
266
261
...args :
267
262
| [ propertyName : string , ...additionalPropertyNames : string [ ] , func : T ]
268
263
| [ ObserverDefinition < T > ]
269
- ) : T {
270
- let funcOrDef = args . pop ( ) ;
271
-
272
- assert (
273
- 'observer must be provided a function or an observer definition' ,
274
- typeof funcOrDef === 'function' || ( typeof funcOrDef === 'object' && funcOrDef !== null )
275
- ) ;
276
-
277
- let func : T ;
278
- let dependentKeys : string [ ] ;
279
- let sync : boolean ;
280
-
281
- if ( typeof funcOrDef === 'function' ) {
282
- func = funcOrDef ;
283
- dependentKeys = args as string [ ] ;
284
- sync = ! ENV . _DEFAULT_ASYNC_OBSERVERS ;
285
- } else {
286
- func = funcOrDef . fn ;
287
- dependentKeys = funcOrDef . dependentKeys ;
288
- sync = funcOrDef . sync ;
289
- }
290
-
291
- assert ( 'observer called without a function' , typeof func === 'function' ) ;
292
- assert (
293
- 'observer called without valid path' ,
294
- Array . isArray ( dependentKeys ) &&
295
- dependentKeys . length > 0 &&
296
- dependentKeys . every ( ( p ) => typeof p === 'string' && Boolean ( p . length ) )
297
- ) ;
298
- assert ( 'observer called without sync' , typeof sync === 'boolean' ) ;
299
-
300
- let paths : string [ ] = [ ] ;
301
-
302
- for ( let dependentKey of dependentKeys ) {
303
- expandProperties ( dependentKey , ( path : string ) => paths . push ( path ) ) ;
304
- }
305
-
306
- setObservers ( func as Function , {
307
- paths,
308
- sync,
309
- } ) ;
310
- return func ;
311
- }
264
+ ) : T { }
0 commit comments