From a06d76a4d95e764b01c35de5e90bed9df77abee8 Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Fri, 21 Sep 2018 12:16:57 +0100 Subject: [PATCH 1/2] adding hex types for chromajs colour scales --- types/chroma-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index 8fdae85b4d..799e853c73 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -321,7 +321,7 @@ declare namespace chroma { * Set out format for scale() call. Passing null will result in a scale which outputs colors. */ out(format: null): Scale; - out(format: K): Scale; + out(format: K | 'hex'): Scale; } interface Cubehelix { From abf3c77632c719c59749be0b1970f230f512b07b Mon Sep 17 00:00:00 2001 From: Tom Evans Date: Thu, 27 Sep 2018 09:13:11 +0100 Subject: [PATCH 2/2] moving the hex scale definition into a separate overload --- types/chroma-js/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index 799e853c73..faeba01bb1 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -321,7 +321,8 @@ declare namespace chroma { * Set out format for scale() call. Passing null will result in a scale which outputs colors. */ out(format: null): Scale; - out(format: K | 'hex'): Scale; + out(format: K): Scale; + out(format: 'hex'): Scale; } interface Cubehelix {