From 4cac3837918524981afd45fab9ea37c1ac67482a Mon Sep 17 00:00:00 2001 From: Marcel Binot Date: Mon, 5 Nov 2012 11:13:28 +0100 Subject: [PATCH] fixes in Backbone --- Definitions/backbone-0.9.d.ts | 10 ++++++---- Definitions/knockback-0.16.d.ts | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Definitions/backbone-0.9.d.ts b/Definitions/backbone-0.9.d.ts index f0ce123702..225b196fda 100644 --- a/Definitions/backbone-0.9.d.ts +++ b/Definitions/backbone-0.9.d.ts @@ -61,7 +61,6 @@ declare module Backbone { attributes: any; changed: any[]; cid: string; - defaults: any; // or defaults(); id: any; idAttribute: string; urlRoot: string; // or urlRoot() @@ -77,6 +76,7 @@ declare module Backbone { changedAttributes(attributes?: any): any[]; clear(options?: Silenceable); clone(): Model; + defaults(): any; destroy(options?: JQueryAjaxSettings); escape(attribute: string); has(attribute: string): bool; @@ -101,14 +101,16 @@ declare module Backbone { constructor (models?: any, options?: any); + comparator(element: Model): number; + comparator(element: Model): string; + comparator(compare: Model, to?: Model): number; + add(model: Model, options?: AddOptions); add(models: Model[], options?: AddOptions); at(index: number): Model; - comparator(attribute: string): number; - comparator(compare: Model, to: Model): number; get(id: any): Model; getByCid(cid): Model; - create(attributes: any, options?: CreateOptions): Collection; + create(attributes: any, options?: CreateOptions): Model; pluck(attribute: string): any[]; push(model: Model, options?: AddOptions); pop(options?: Silenceable); diff --git a/Definitions/knockback-0.16.d.ts b/Definitions/knockback-0.16.d.ts index 1d8e13a7d0..e41857dfc0 100644 --- a/Definitions/knockback-0.16.d.ts +++ b/Definitions/knockback-0.16.d.ts @@ -124,7 +124,9 @@ declare module Knockback { collection(): Backbone.Collection; destroy(); shareOptions(): CollectionOptions; - filters(filter: any); + filters(id: any) : Backbone.Model; + filters(ids: any[]): CollectionObservable; + filters(iterator: (element: Backbone.Model) => bool): CollectionObservable; comparator(comparatorFunction: any); sortAttribute(attr: string); viewModelByModel(model: Backbone.Model): ViewModel;