diff --git a/randomcolor/randomColor.d.ts b/randomcolor/randomColor.d.ts index a92af51453..4c85f12da5 100644 --- a/randomcolor/randomColor.d.ts +++ b/randomcolor/randomColor.d.ts @@ -3,26 +3,13 @@ // Definitions by: Mathias Feitzinger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace RandomColor { - interface RandomColorStatic { +declare function randomColor(options?: RandomColorOptions): string; - () : string; - - (options : randomColorOptions): string; -} - -interface randomColorOptions { - hue? : string; - luminosity? : string; - count? : string | number; - seed?: string; - format?: string; - } -} - -declare var randomColor: RandomColor.RandomColorStatic; - -declare module 'randomcolor' { - export = randomColor; -} \ No newline at end of file +interface RandomColorOptions { + hue? : number | "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "monochrome" | "random"; + luminosity? : "bright" | "light" | "dark" | "random"; + count? : number; + seed?: number | string; + format?: "hsvArray" | "hslArray" | "hsl" | "hsla" | "rgbArray"| "rgb"| "rgba"| "hex"; + } \ No newline at end of file diff --git a/randomcolor/randomcolor.d.ts b/randomcolor/randomcolor.d.ts index a92af51453..4c85f12da5 100644 --- a/randomcolor/randomcolor.d.ts +++ b/randomcolor/randomcolor.d.ts @@ -3,26 +3,13 @@ // Definitions by: Mathias Feitzinger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace RandomColor { - interface RandomColorStatic { +declare function randomColor(options?: RandomColorOptions): string; - () : string; - - (options : randomColorOptions): string; -} - -interface randomColorOptions { - hue? : string; - luminosity? : string; - count? : string | number; - seed?: string; - format?: string; - } -} - -declare var randomColor: RandomColor.RandomColorStatic; - -declare module 'randomcolor' { - export = randomColor; -} \ No newline at end of file +interface RandomColorOptions { + hue? : number | "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "monochrome" | "random"; + luminosity? : "bright" | "light" | "dark" | "random"; + count? : number; + seed?: number | string; + format?: "hsvArray" | "hslArray" | "hsl" | "hsla" | "rgbArray"| "rgb"| "rgba"| "hex"; + } \ No newline at end of file