-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
74 lines (74 loc) · 1.99 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
export { SGRcomposer as default };
/**
* A Class for composing various SGR codes.
* @type {SGRcomposer}
*/
declare class SGRcomposer {
/**
* A Class for composing various SGR codes.
* @param {number|string} targetDepth - The target color depth.
* @param {style} styles - Additional SGR style codes.
*/
constructor(targetDepth: number | string, styles: any);
_depth: any;
colorSGR: any;
/**
* Set the current style
* @param {style | array} styles The desired styles as an object or array of keys.
*/
set style(arg: any);
/**
* Get the current style object
* @return {style} The currently set styles
*/
get style(): any;
/**
* Get the current color depth.
* @return {number} 0: no color, 1: 16 colors, 2: 256 colors, 3: 16m colors
*/
get depth(): number;
/**
* Set the current color
* @param {number[]} color RGB as an array.
*/
set color(arg: number[]);
/**
* Get the raw RGB color as an array.
* @return {number[]} An array of RGB elements
*/
get color(): number[];
_color: any;
/**
* Get the raw color as a hex string.
* @return {string} Color as hex string: #RRGGBB
*/
get hex(): string;
/**
* Get the red component.
* @return {number} Red component [0-255]
*/
get red(): number;
/**
* Get the green component.
* @return {number} Green component [0-255]
*/
get green(): number;
/**
* Get the blue component.
* @return {number} Blue component [0-255]
*/
get blue(): number;
styles: any;
styleSGR: any;
/**
* Get the current style as an array of keys.
* @return {string[]} An array of style keys.
*/
get styleArray(): string[];
/**
* Render and SGRColor object.
* @param {object} exclusions - Styles to exclude from render.
* @return {SGRColor} The rendered SGRColor object.
*/
sgr(exclusions: object): any;
}