Add types for AutoFill extension

This commit is contained in:
Andy Ma
2018-03-28 11:01:17 +08:00
parent 1539c6a98b
commit 353076277e
4 changed files with 61 additions and 0 deletions
@@ -0,0 +1,7 @@
const config: DataTables.Settings = {
// AutoFill extension options
autoFill: {
alwaysAsk: true,
enable: true
}
};
+30
View File
@@ -0,0 +1,30 @@
// Type definitions for datatables.net-autofill 2.2
// Project: https://datatables.net
// Definitions by: Andy Ma <https://github.com/andy-maca>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
/// <reference types="jquery" />
/// <reference types="datatables.net"/>
declare namespace DataTables {
interface Settings {
/*
* autoFill extension options
*/
autoFill?: boolean | AutoFillSettings;
}
interface AutoFillSettings {
/*
* Always ask the end user if an action should be taken or not
*/
alwaysAsk?: boolean;
/*
*
* Initial enablement state of AutoFill
*/
enable?: boolean;
}
}
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"datatables.net-autofill-tests.ts"
]
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }