diff --git a/types/chroma-js/chroma-js-tests.ts b/types/chroma-js/chroma-js-tests.ts index 463733fa5c..ddda405f6f 100644 --- a/types/chroma-js/chroma-js-tests.ts +++ b/types/chroma-js/chroma-js-tests.ts @@ -11,6 +11,7 @@ function test_chroma() { chroma.valid({}); chroma.valid(null); chroma.valid(undefined); + chroma.valid('000', 'hex'); chroma(0xff3399); chroma(0xff, 0x33, 0x99); diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index dd6a762836..3d4b5b92c5 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Chroma.js 1.4 +// Type definitions for Chroma.js 2.0 // Project: https://github.com/gka/chroma.js // Definitions by: Sebastian Brückner , Marcin Pacholec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -62,7 +62,7 @@ declare namespace chroma { */ hex(color: string): Color; - valid(color: any): boolean; + valid(color: any, mode?: string): boolean; hsl(h: number, s: number, l: number): Color;