d3-color : use type instead of interface

This commit is contained in:
Hugues Stefanski
2018-05-18 21:46:44 +02:00
parent be78af0d6c
commit 1606c6c190

View File

@@ -32,7 +32,7 @@ export interface ColorCommonInstance {
* 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;
hex(): string;
}
export interface Color {
@@ -108,9 +108,7 @@ export interface LabColorFactory extends Function {
/**
* Constructs a new Lab color with the specified l value and a = b = 0.
*/
export interface GrayColorFactory {
(l: number, opacity?: number): LabColor;
}
export type GrayColorFactory = (l: number, opacity?: number) => LabColor;
export interface HCLColor extends Color {
h: number;