From 2a3bb99eb74d3f9067028fea44868f6f87cd41c5 Mon Sep 17 00:00:00 2001 From: slozier Date: Thu, 29 May 2014 10:31:34 -0400 Subject: [PATCH] Update SlickGrid.d.ts Updated DataProvider to DataProvider --- slickgrid/SlickGrid.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index ddd36932b..9e66b9647 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -689,8 +689,8 @@ declare module Slick { topPanelHeight?: number; } - export interface DataProvider { - getItem(index: number): SlickData; + export interface DataProvider { + getItem(index: number): T; getLength(): number; } @@ -705,7 +705,7 @@ declare module Slick { * The grid also provides two helper methods to simplify development - getSelectedRows() and setSelectedRows(rowsArray), as well as an onSelectedRowsChanged event. * SlickGrid includes two pre-made selection models - Slick.CellSelectionModel and Slick.RowSelectionModel, but you can easily write a custom one. **/ - export class SelectionModel { + export class SelectionModel { /** * An initializer function that will be called with an instance of the grid whenever a selection model is registered with setSelectionModel. The selection model can use this to initialize its state and subscribe to grid events. **/ @@ -740,12 +740,12 @@ declare module Slick { options: GridOptions); constructor( container: string, - data: DataProvider, + data: DataProvider, columns: Column[], options: GridOptions); constructor( container: HTMLElement, - data: DataProvider, + data: DataProvider, columns: Column[], options: GridOptions); @@ -789,7 +789,7 @@ declare module Slick { * @param newData New databinding source using a custom object exposing getItem(index) and getLength() functions. * @param scrollToTop If true, the grid will reset the vertical scroll position to the top of the grid. **/ - public setData(newData: { getItem: (index: number) => T; getLength: () => number; }, scrollToTop: boolean): void; + public setData(newData: DataProvider, scrollToTop: boolean): void; /** * Returns the size of the databinding source. @@ -1485,7 +1485,7 @@ declare module Slick { * Item -> Data by index * Row -> Data by row **/ - export class DataView implements DataProvider { + export class DataView implements DataProvider { constructor(options?: DataViewOptions); @@ -1555,7 +1555,7 @@ declare module Slick { public syncGridCellCssStyles(grid: Grid, key: string): void; public getLength(): number; - public getItem(index: number): SlickData; + public getItem(index: number): T; public getItemMetadata(): void; public onRowCountChanged: Slick.Event;