Merge pull request #19875 from euginio/master

New types for the "tabulator" npm package
This commit is contained in:
Benjamin Lichtman
2017-09-19 12:37:00 -07:00
committed by GitHub
4 changed files with 46 additions and 0 deletions

18
types/tabulator/index.d.ts vendored Normal file
View 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;
}

View File

@@ -0,0 +1,5 @@
let tab = new tabulatorLib();
tab.defaultShowAttribute = 'valor';
let datum = { a: 'aaa' };
let matrix = tab.toMatrix(datum);
tab.toHtmlTable(matrix);

View 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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }