Skip to content

Commit 7efe26a

Browse files
committed
Merge pull request DefinitelyTyped#1416 from nvivo/backbone_collections
Added missing overloads to add/reset
2 parents 5ea1a8e + 44161fb commit 7efe26a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backbone/backbone.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ declare module Backbone {
158158
comparator(compare: Model, to?: Model): any;
159159

160160
add(model: Model, options?: AddOptions): Collection;
161+
add(model: any, options?: AddOptions): Collection;
161162
add(models: Model[], options?: AddOptions): Collection;
163+
add(models: any[], options?: AddOptions): Collection;
162164
at(index: number): Model;
163165
get(id: any): Model;
164166
create(attributes: any, options?: ModelSaveOptions): Model;
@@ -168,6 +170,7 @@ declare module Backbone {
168170
remove(model: Model, options?: Silenceable): Model;
169171
remove(models: Model[], options?: Silenceable): Model[];
170172
reset(models?: Model[], options?: Silenceable): Model[];
173+
reset(models?: any[], options?: Silenceable): Model[];
171174
shift(options?: Silenceable): Model;
172175
sort(options?: Silenceable): Collection;
173176
unshift(model: Model, options?: AddOptions): Model;

0 commit comments

Comments
 (0)