From dc015afdc27d8ff40b45913fef9348742749da9a Mon Sep 17 00:00:00 2001 From: Boris Yankov Date: Wed, 7 Nov 2012 11:21:51 +0200 Subject: [PATCH] Fix ember.js defintions --- Definitions/ember-1.0.d.ts | 7 +++++-- Tests/ember-tests.ts | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Definitions/ember-1.0.d.ts b/Definitions/ember-1.0.d.ts index ebf8450667..3542b4723b 100644 --- a/Definitions/ember-1.0.d.ts +++ b/Definitions/ember-1.0.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module "Ember" { +declare module Ember { export class CoreObject { isDestroyed: bool; @@ -46,13 +46,16 @@ declare module "Ember" { } export interface Mixin { + apply(obj: Object): Object; create(obj: Object): Object; + detect(obj: Object): bool; extend(first: Object, second: Object): Object; + reopen(...arguments: any[]): Mixin; } export class View extends Object { append(): View; - static create(...arguments: any[]): Application; + static create(...arguments: any[]): View; } export interface Enumerable extends Mixin { diff --git a/Tests/ember-tests.ts b/Tests/ember-tests.ts index 8fea25eaa6..43f2b4dcf4 100644 --- a/Tests/ember-tests.ts +++ b/Tests/ember-tests.ts @@ -171,15 +171,15 @@ Person = Ember.Object.extend({ name: null, isHappy: false }); -var people = [ +var people2 = [ Person.create({ name: 'Yehuda', isHappy: true }), Person.create({ name: 'Majd', isHappy: false }) ]; -people.every((person, index, self) => { +people2.every((person, index, self) => { if (person.get('isHappy')) { return true; } }); -people.some((person, index, self) => { +people2.some((person, index, self) => { if (person.get('isHappy')) { return true; } }); -people.everyProperty('isHappy', true); -people.someProperty('isHappy', true); \ No newline at end of file +people2.everyProperty('isHappy', true); +people2.someProperty('isHappy', true); \ No newline at end of file