diff --git a/knockout.kogrid/ko-grid.d.ts b/knockout.kogrid/ko-grid.d.ts
index cc10fa4d9e..fe9877e038 100644
--- a/knockout.kogrid/ko-grid.d.ts
+++ b/knockout.kogrid/ko-grid.d.ts
@@ -8,29 +8,27 @@
///
declare namespace kg {
- export interface DomUtilityService {
+ interface DomUtilityService {
UpdateGridLayout(grid: Grid): void;
BuildStyles(grid: Grid): void;
}
- var domUtilityService: DomUtilityService;
-
- export interface Row {
+ interface Row {
selected: KnockoutObservable;
entity: EntityType;
}
- export interface RowFactory {
+ interface RowFactory {
rowCache: Row[];
}
- export interface SelectionService {
+ interface SelectionService {
setSelection(row: Row, selected: boolean): void;
multi: boolean;
lastClickedRow: Row;
}
- export interface Grid {
+ interface Grid {
configureColumnWidths(): void;
rowFactory: RowFactory;
config: GridOptions;
@@ -38,11 +36,11 @@ declare namespace kg {
selectionService: SelectionService;
}
- export interface Plugin {
+ interface Plugin {
onGridInit(grid: Grid): void;
}
- export interface GridOptions {
+ interface GridOptions {
/** Callback for when you want to validate something after selection. */
afterSelectionChange?(row: Row): void;
@@ -164,7 +162,7 @@ declare namespace kg {
useExternalSorting?: boolean;
}
- export interface ColumnDef {
+ interface ColumnDef {
/** The string name of the property in your data model you want that column to represent. Can also be a property path on your data model. 'foo.bar.myField', 'Name.First', etc.. */
field: string;
@@ -175,12 +173,12 @@ declare namespace kg {
width?: string;
}
- export interface FilterOptions {
+ interface FilterOptions {
filterText?: string;
useExternalFilter?: boolean;
}
- export interface PagingOptions {
+ interface PagingOptions {
/** pageSizes: list of available page sizes. */
pageSizes?: number[];
/** pageSize: currently selected page size. */
@@ -191,3 +189,14 @@ declare namespace kg {
currentPage?: number;
}
}
+
+interface IKg {
+ domUtilityService: kg.DomUtilityService;
+}
+
+declare var kg: IKg;
+
+declare module "kg" {
+ export = kg;
+}
+