From 94127b739b4972c695f2191afdc16161b4df9c4f Mon Sep 17 00:00:00 2001 From: Julian Hundeloh Date: Thu, 14 Feb 2019 13:21:14 +0100 Subject: [PATCH 1/3] fix: update Tinycon types - `setBubble`: also accepts strings or null values - `fallback`: `force` is allowed, see: https://github.com/tommoor/tinycon/blob/83ed386e367d0bb6e27b496ec3b6240ce43f6a27/tinycon.js#L115 --- types/tinycon/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/tinycon/index.d.ts b/types/tinycon/index.d.ts index 3f385603cc..745baa28a8 100644 --- a/types/tinycon/index.d.ts +++ b/types/tinycon/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Daniel Waxweiler // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function setBubble(count: number): void; +export function setBubble(count: number|string|null): void; export function setOptions(options: TinyconOptions): void; @@ -11,7 +11,7 @@ export interface TinyconOptions { abbreviate?: boolean; background?: string; color?: string; - fallback?: boolean; + fallback?: boolean | 'force'; font?: string; height?: number; width?: number; From 088506cb1f4598467fd03167c7d187719edd7210 Mon Sep 17 00:00:00 2001 From: Julian Hundeloh Date: Fri, 15 Feb 2019 07:32:56 +0100 Subject: [PATCH 2/3] fix: add spaces and contributor --- types/tinycon/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/tinycon/index.d.ts b/types/tinycon/index.d.ts index 745baa28a8..03d1ce4dc8 100644 --- a/types/tinycon/index.d.ts +++ b/types/tinycon/index.d.ts @@ -1,9 +1,10 @@ // Type definitions for tinycon 0.6 // Project: https://github.com/tommoor/tinycon // Definitions by: Daniel Waxweiler +// Julian Hundeloh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function setBubble(count: number|string|null): void; +export function setBubble(count: number | string | null): void; export function setOptions(options: TinyconOptions): void; From 976d022800f8459f6b42d529a192fed297bb6eda Mon Sep 17 00:00:00 2001 From: Julian Hundeloh Date: Fri, 15 Feb 2019 07:40:16 +0100 Subject: [PATCH 3/3] fix: update test --- types/tinycon/tinycon-tests.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/tinycon/tinycon-tests.ts b/types/tinycon/tinycon-tests.ts index b4bcc304ac..fb898630e7 100644 --- a/types/tinycon/tinycon-tests.ts +++ b/types/tinycon/tinycon-tests.ts @@ -10,4 +10,16 @@ Tinycon.setOptions({ width: 7 }); +Tinycon.setOptions({ + abbreviate: false, + background: '#549A2F', + color: '#ffffff', + fallback: 'force', + font: '10px arial', + height: 9, + width: 7 +}); + Tinycon.setBubble(7); + +Tinycon.setBubble(null);