Allow multiple mixins

This commit is contained in:
Marius Seritan 2016-11-28 07:12:41 -08:00
parent 1d8b48f01f
commit 045ea355db
2 changed files with 11 additions and 2 deletions

View File

@ -160,7 +160,15 @@ promise.then(function(value: any) {
// on rejection
});
var component1 = Ember.Component.extend({
var mix1 = Ember.Mixin.create({
foo: 1
});
var mix2 = Ember.Mixin.create({
bar: 2
});
var component1 = Ember.Component.extend( mix1, mix2, {
lyft: Ember.inject.service(),
cars: Ember.computed.readOnly('lyft.cars')
});

3
ember/index.d.ts vendored
View File

@ -874,7 +874,8 @@ declare namespace Ember {
@param {Object} [args] - Object containing values to use within the new class
**/
static extend<T>(args?: CoreObjectArguments): T;
static extend<T>(mixins?: Mixin, args?: CoreObjectArguments): T;
static extend<T>(mixin1: Mixin, args?: CoreObjectArguments): T;
static extend<T>(mixin1: Mixin, mixin2: Mixin, args?: CoreObjectArguments): T;
/**
Creates a new subclass.