From 1fe804314867cf0db933b7cc76212960a50a8935 Mon Sep 17 00:00:00 2001 From: Robert Dennis Date: Wed, 29 Apr 2015 23:09:49 -0400 Subject: [PATCH] jquery.dataTables - fix FunctionColumnRender and FunctionColumnData signitures. --- jquery.dataTables/jquery.dataTables-tests.ts | 7 ++++++- jquery.dataTables/jquery.dataTables.d.ts | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/jquery.dataTables/jquery.dataTables-tests.ts b/jquery.dataTables/jquery.dataTables-tests.ts index c90b40d090..552b997b8e 100755 --- a/jquery.dataTables/jquery.dataTables-tests.ts +++ b/jquery.dataTables/jquery.dataTables-tests.ts @@ -44,6 +44,9 @@ $(document).ready(function () { }; var colDataFunc: DataTables.FunctionColumnData = function (row, type, set, meta) { + meta.col; + meta.row; + meta.settings; }; var colRenderObject: DataTables.ObjectColumnRender = { @@ -54,7 +57,9 @@ $(document).ready(function () { }; var colRenderFunc: DataTables.FunctionColumnRender = function (data, type, row, meta) { - + meta.col; + meta.row; + meta.settings; }; var col: DataTables.ColumnSettings = diff --git a/jquery.dataTables/jquery.dataTables.d.ts b/jquery.dataTables/jquery.dataTables.d.ts index cbcb1c0257..50ff52edd5 100755 --- a/jquery.dataTables/jquery.dataTables.d.ts +++ b/jquery.dataTables/jquery.dataTables.d.ts @@ -1498,7 +1498,7 @@ declare module DataTables { } interface FunctionColumnData { - (row: any, t: string, s: any, meta: Object): void; + (row: any, t: string, s: any, meta: CellMetaSettings): void; } interface ObjectColumnData { @@ -1513,7 +1513,13 @@ declare module DataTables { } interface FunctionColumnRender { - (data: Node, t: Node, row: Node, meta: Object): void; + (data: any, t: string, row: any, meta: CellMetaSettings): void; + } + + interface CellMetaSettings { + row: number; + col: number; + settings: DataTables.Settings; } //#endregion "colunm-settings"