From 969d99802b7fef695219d5600de872d57c78e12c Mon Sep 17 00:00:00 2001 From: denis Date: Wed, 23 May 2018 18:35:57 +0200 Subject: [PATCH 1/2] d3-timer Activate strictNullChecks --- types/d3-timer/index.d.ts | 4 ++-- types/d3-timer/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/d3-timer/index.d.ts b/types/d3-timer/index.d.ts index 08fee97696..34bef32aba 100644 --- a/types/d3-timer/index.d.ts +++ b/types/d3-timer/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.0.2 +// Last module patch version validated against: 1.0.7 /** * Returns the current time as defined by performance.now if available, and Date.now if not. @@ -44,7 +44,7 @@ export interface Timer { export function timer(callback: (elapsed: number) => void, delay?: number, time?: number): Timer; /** - * Immediately invoke any eligible timer callbacks + * Immediately invoke any eligible timer callbacks. */ export function timerFlush(): void; diff --git a/types/d3-timer/tsconfig.json b/types/d3-timer/tsconfig.json index f3af0c7d8e..91aaaf2092 100644 --- a/types/d3-timer/tsconfig.json +++ b/types/d3-timer/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ From 0dcddbf82ed69b17b12063f886af70e0224ca8f9 Mon Sep 17 00:00:00 2001 From: denis Date: Wed, 23 May 2018 19:06:03 +0200 Subject: [PATCH 2/2] Remove hex inherited from Color in d3-hsv --- types/d3-hsv/d3-hsv-tests.ts | 1 + types/d3-hsv/index.d.ts | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/types/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts index 780f584c7c..20cdd4f911 100644 --- a/types/d3-hsv/d3-hsv-tests.ts +++ b/types/d3-hsv/d3-hsv-tests.ts @@ -48,6 +48,7 @@ cHSV = cHSV.darker(); cHSV = cHSV.darker(0.2); displayable = cHSV.displayable(); cString = cHSV.toString(); +cString = cHSV.hex(); console.log('Channels = (h : %d, s: %d, v: %d)', cHSV.h, cHSV.s, cHSV.v); console.log('Opacity = %d', cHSV.opacity); diff --git a/types/d3-hsv/index.d.ts b/types/d3-hsv/index.d.ts index 7452dbcc2b..1728af0874 100644 --- a/types/d3-hsv/index.d.ts +++ b/types/d3-hsv/index.d.ts @@ -68,12 +68,6 @@ export interface HSVColor extends Color { * Returns the RGB equivalent of this color. */ rgb(): RGBColor; - - /** - * Returns a hexadecimal string representing this color. - * If this color is not displayable, a suitable displayable color is returned instead. For example, RGB channel values greater than 255 are clamped to 255. - */ - hex(): string; } export const hsv: HSVColorFactory;