Merge pull request #54 from docgit/master

Fix Backbone and Knockback
This commit is contained in:
Boris Yankov
2012-11-06 01:48:27 -08:00
2 changed files with 9 additions and 5 deletions

View File

@@ -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);

View File

@@ -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;