mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 11:07:32 +08:00
Merge pull request #19875 from euginio/master
New types for the "tabulator" npm package
This commit is contained in:
18
types/tabulator/index.d.ts
vendored
Normal file
18
types/tabulator/index.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// Type definitions for tabulator 0.1
|
||||
// Project: https://github.com/codenautas/tabulator
|
||||
// Definitions by: Eugenio Arosteguy <https://github.com/euginio>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace tabulatorLib;
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export = Tabulator;
|
||||
|
||||
/*~ Write your module's methods and properties in this class */
|
||||
declare class Tabulator {
|
||||
constructor();
|
||||
// myMethod(opts: Tabulator.chartType): number;
|
||||
defaultShowAttribute: string;
|
||||
toMatrix(datum: object): object;
|
||||
toHtmlTable(matrix: object): any;
|
||||
}
|
||||
5
types/tabulator/tabulator-tests.ts
Normal file
5
types/tabulator/tabulator-tests.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
let tab = new tabulatorLib();
|
||||
tab.defaultShowAttribute = 'valor';
|
||||
let datum = { a: 'aaa' };
|
||||
let matrix = tab.toMatrix(datum);
|
||||
tab.toHtmlTable(matrix);
|
||||
22
types/tabulator/tsconfig.json
Normal file
22
types/tabulator/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"tabulator-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/tabulator/tslint.json
Normal file
1
types/tabulator/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user