From 539eb90acee5f0ed479d0a6feaae829e1a763ebb Mon Sep 17 00:00:00 2001 From: Mateusz Warkocki Date: Thu, 18 Jun 2015 18:47:03 +0200 Subject: [PATCH 1/3] fix argument typing for Mixin.create in ember.d.ts `Mixin.create` can take not one, but multiple arguments like e.g. `Component.extend` to extend other mixins. Ember code: https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/mixin.js#L589 This method in action: http://jsbin.com/kipenaxowe/edit?html,js,console --- ember/ember.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ember/ember.d.ts b/ember/ember.d.ts index cd1ef6079e..691178d79d 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -1418,9 +1418,9 @@ declare module Ember { apply(obj: any): any; /** Creates an instance of the class. - @param arguments A hash containing values with which to initialize the newly instantiated object. + @param args A hash containing values with which to initialize the newly instantiated object. **/ - static create(args: {}): T; + static create(...args: []): T; detect(obj: any): boolean; reopen(args?: {}): T; } From 4185303285505795fada9aa0c8292dfcbc929f59 Mon Sep 17 00:00:00 2001 From: Mateusz Warkocki Date: Thu, 18 Jun 2015 19:01:33 +0200 Subject: [PATCH 2/3] type of argument list elements for Mixin.create --- ember/ember.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ember/ember.d.ts b/ember/ember.d.ts index 691178d79d..94a3d1cbb5 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -1418,9 +1418,9 @@ declare module Ember { apply(obj: any): any; /** Creates an instance of the class. - @param args A hash containing values with which to initialize the newly instantiated object. + @param arguments A hash containing values with which to initialize the newly instantiated object. **/ - static create(...args: []): T; + static create(...arguments: []): T; detect(obj: any): boolean; reopen(args?: {}): T; } From f7ac2d7969f437f1fb1d9285afd193617ebae07d Mon Sep 17 00:00:00 2001 From: Mateusz Warkocki Date: Thu, 18 Jun 2015 19:03:38 +0200 Subject: [PATCH 3/3] type of argument list elements for Mixin.create --- ember/ember.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember/ember.d.ts b/ember/ember.d.ts index 94a3d1cbb5..a1b829ddfe 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -1420,7 +1420,7 @@ declare module Ember { Creates an instance of the class. @param arguments A hash containing values with which to initialize the newly instantiated object. **/ - static create(...arguments: []): T; + static create(...arguments: CoreObjectArguments[]): T; detect(obj: any): boolean; reopen(args?: {}): T; }