DefinitelyTyped/types/linear-gradient/index.d.ts
Jack Works 655e4406d0 Add document ready & linear-gradient (#27367)
* Add document-ready

* Add linear-gradient
2018-07-23 11:20:34 -07:00

19 lines
632 B
TypeScript

// Type definitions for linear-gradient 1.0
// Project: https://github.com/karmadata/linear-gradient#readme
// Definitions by: Jack Works <https://github.com/Jack-Works>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
type Color = [number, number, number];
declare class Gradient {
constructor(colors: Color[]);
/**
* the input value should be normalized to the range between 0 and 1
*/
calcArray(normalizedPercent: number): Color;
/**
* the input value should be normalized to the range between 0 and 1
*/
calcHex(normalizedPrecent: number): string;
}
export = Gradient;