diff --git a/types/tinycon/index.d.ts b/types/tinycon/index.d.ts new file mode 100644 index 0000000000..3f385603cc --- /dev/null +++ b/types/tinycon/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for tinycon 0.6 +// Project: https://github.com/tommoor/tinycon +// Definitions by: Daniel Waxweiler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function setBubble(count: number): void; + +export function setOptions(options: TinyconOptions): void; + +export interface TinyconOptions { + abbreviate?: boolean; + background?: string; + color?: string; + fallback?: boolean; + font?: string; + height?: number; + width?: number; +} diff --git a/types/tinycon/tinycon-tests.ts b/types/tinycon/tinycon-tests.ts new file mode 100644 index 0000000000..b4bcc304ac --- /dev/null +++ b/types/tinycon/tinycon-tests.ts @@ -0,0 +1,13 @@ +import * as Tinycon from 'tinycon'; + +Tinycon.setOptions({ + abbreviate: false, + background: '#549A2F', + color: '#ffffff', + fallback: true, + font: '10px arial', + height: 9, + width: 7 +}); + +Tinycon.setBubble(7); diff --git a/types/tinycon/tsconfig.json b/types/tinycon/tsconfig.json new file mode 100644 index 0000000000..2410f4bd8a --- /dev/null +++ b/types/tinycon/tsconfig.json @@ -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", + "tinycon-tests.ts" + ] +} diff --git a/types/tinycon/tslint.json b/types/tinycon/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/tinycon/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}