diff --git a/types/tabulator/index.d.ts b/types/tabulator/index.d.ts new file mode 100644 index 0000000000..a773396f2c --- /dev/null +++ b/types/tabulator/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for tabulator 0.1 +// Project: https://github.com/codenautas/tabulator +// Definitions by: Eugenio Arosteguy +// 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; +} diff --git a/types/tabulator/tabulator-tests.ts b/types/tabulator/tabulator-tests.ts new file mode 100644 index 0000000000..2cd6f9e245 --- /dev/null +++ b/types/tabulator/tabulator-tests.ts @@ -0,0 +1,5 @@ +let tab = new tabulatorLib(); +tab.defaultShowAttribute = 'valor'; +let datum = { a: 'aaa' }; +let matrix = tab.toMatrix(datum); +tab.toHtmlTable(matrix); diff --git a/types/tabulator/tsconfig.json b/types/tabulator/tsconfig.json new file mode 100644 index 0000000000..32db9cfaad --- /dev/null +++ b/types/tabulator/tsconfig.json @@ -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" + ] +} diff --git a/types/tabulator/tslint.json b/types/tabulator/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/tabulator/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }