mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Create index.d.ts * Create LICENSE * Create README.md * Update README.md * Create package.json * Delete LICENSE * Delete README.md * Delete package.json * Create datatables.net-fixedcolumns-tests.ts * Create tslint.json * Create tsconfig.json * changes after tslint * formatting * formatting * formatting * correct return types add deprecation comments * Type definitions for datatables.net-keytable * @armanio123: "use a string literal type to improve the dev experience" * fix call FixedColumns Api * add cell/cells methods
109 lines
2.3 KiB
TypeScript
109 lines
2.3 KiB
TypeScript
// Type definitions for datatables.net-select 1.2
|
|
// Project: https://datatables.net/extensions/select/, https://datatables.net
|
|
// Definitions by: Jared Szechy <https://github.com/szechyjs>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.4
|
|
|
|
/// <reference types="jquery" />
|
|
/// <reference types="datatables.net"/>
|
|
|
|
declare namespace DataTables {
|
|
interface Settings {
|
|
/*
|
|
* Select extension options
|
|
*/
|
|
select?: boolean | string | SelectSettings;
|
|
}
|
|
|
|
interface SelectSettings {
|
|
/*
|
|
* Indicate if the selected items will be removed when clicking outside of the table
|
|
*/
|
|
blurable?: boolean;
|
|
|
|
/*
|
|
* Set the class name that will be applied to selected items
|
|
*/
|
|
className?: string;
|
|
|
|
/*
|
|
* Enable / disable the display for item selection information in the table summary
|
|
*/
|
|
info?: boolean;
|
|
|
|
/*
|
|
* Set which table items to select (rows, columns or cells)
|
|
*/
|
|
items?: string;
|
|
|
|
/*
|
|
* Set the element selector used for mouse event capture to select items
|
|
*/
|
|
selector?: string;
|
|
|
|
/*
|
|
* Set the selection style for end user interaction with the table
|
|
*/
|
|
style?: "api" | "single" | "multi" | "os" | "multi+shift";
|
|
}
|
|
|
|
interface Api {
|
|
select: {
|
|
/*
|
|
* Get the current selection style applied to the table
|
|
*/
|
|
style(): string;
|
|
/*
|
|
* Set the table's selection style
|
|
*/
|
|
style(s: "api" | "single" | "multi" | "os"): Api;
|
|
};
|
|
}
|
|
|
|
interface RowMethods {
|
|
/**
|
|
* Select a row
|
|
*/
|
|
select(): Api;
|
|
/**
|
|
* Deselect a row
|
|
*/
|
|
deselect(): Api;
|
|
}
|
|
|
|
interface RowsMethods {
|
|
/**
|
|
* Select multiple rows
|
|
*/
|
|
select(): Api;
|
|
/**
|
|
* Deselect a row
|
|
*/
|
|
deselect(): Api;
|
|
}
|
|
|
|
interface CellMethods {
|
|
/**
|
|
* Select cell
|
|
*/
|
|
select(): Api;
|
|
|
|
/**
|
|
* Deselect a cell
|
|
*/
|
|
deselect(): Api;
|
|
}
|
|
|
|
interface CellsMethods {
|
|
/**
|
|
* Select multiple cells
|
|
*/
|
|
select(): Api;
|
|
|
|
/**
|
|
* Deselect cells
|
|
*/
|
|
deselect(): Api;
|
|
}
|
|
}
|