mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
added string unions for luminosity, hue, format
Hue can also be a number
This commit is contained in:
Vendored
+8
-21
@@ -3,26 +3,13 @@
|
||||
// Definitions by: Mathias Feitzinger <https://github.com/feitzi>
|
||||
// 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;
|
||||
}
|
||||
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";
|
||||
}
|
||||
Vendored
+8
-21
@@ -3,26 +3,13 @@
|
||||
// Definitions by: Mathias Feitzinger <https://github.com/feitzi>
|
||||
// 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;
|
||||
}
|
||||
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";
|
||||
}
|
||||
Reference in New Issue
Block a user