From 8b706fb1c66c6e0a5a283f9b2b3f444f48b616b7 Mon Sep 17 00:00:00 2001 From: Salehen Shovon Rahman Date: Tue, 21 Jul 2015 15:09:23 -0700 Subject: [PATCH] Added slice to Backbone.Collection Without it, TypeScript throws a type error, stating that `Collection` does not have a method called `slice`. --- backbone/backbone.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 275dba237..132db865c 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -247,6 +247,7 @@ declare module Backbone { select(iterator: any, context?: any): any[]; size(): number; shuffle(): any[]; + slice(min: number, max?: number): TModel[]; some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[]; sortBy(attribute: string, context?: any): TModel[];