Skip to content

Commit

Permalink
Merge pull request emberjs#16264 from emberjs/more-classes
Browse files Browse the repository at this point in the history
Convert Descriptor and Alias to native classes
  • Loading branch information
mmun authored Feb 21, 2018
2 parents 7703d4f + 45b9f15 commit 67bf23f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/ember-metal/lib/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,13 +656,13 @@ export function required() {
return REQUIRED;
}

function Alias(methodName) {
this.isDescriptor = true;
this.methodName = methodName;
class Alias extends Descriptor {
constructor(methodName) {
super();
this.methodName = methodName;
}
}

Alias.prototype = new Descriptor();

/**
Makes a method available via an additional name.
Expand Down
6 changes: 4 additions & 2 deletions packages/ember-metal/lib/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ import { peekCacheFor } from './computed';
@class Descriptor
@private
*/
export function Descriptor() {
this.isDescriptor = true;
export class Descriptor {
constructor() {
this.isDescriptor = true;
}
}

// ..........................................................
Expand Down

0 comments on commit 67bf23f

Please sign in to comment.