-
Notifications
You must be signed in to change notification settings - Fork 43
/
Pastel.rei
116 lines (104 loc) · 2.17 KB
/
Pastel.rei
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/;
module Make: () => PastelSig.PastelSig;
module ColorName = ColorName;
type mode =
| Terminal
| HumanReadable
| Disabled;
let getMode: unit => mode;
let setMode: mode => unit;
let defaultMode: mode;
let useMode: (mode, unit => 'a) => 'a;
type decorator = string => string;
type colorName =
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
| BlackBright
| RedBright
| GreenBright
| YellowBright
| BlueBright
| MagentaBright
| CyanBright
| WhiteBright;
type color = {
black: decorator,
red: decorator,
green: decorator,
yellow: decorator,
blue: decorator,
magenta: decorator,
cyan: decorator,
white: decorator,
blackBright: decorator,
redBright: decorator,
greenBright: decorator,
yellowBright: decorator,
blueBright: decorator,
magentaBright: decorator,
cyanBright: decorator,
whiteBright: decorator,
};
type modifier = {
bold: decorator,
dim: decorator,
italic: decorator,
underline: decorator,
inverse: decorator,
hidden: decorator,
strikethrough: decorator,
};
let length: string => int;
let modifier: modifier;
let color: color;
let bg: color;
let bold: decorator;
let dim: decorator;
let italic: decorator;
let underline: decorator;
let inverse: decorator;
let hidden: decorator;
let strikethrough: decorator;
let black: decorator;
let red: decorator;
let green: decorator;
let yellow: decorator;
let blue: decorator;
let magenta: decorator;
let cyan: decorator;
let white: decorator;
let blackBright: decorator;
let redBright: decorator;
let greenBright: decorator;
let yellowBright: decorator;
let blueBright: decorator;
let magentaBright: decorator;
let cyanBright: decorator;
let whiteBright: decorator;
let createElement:
(
~reset: bool=?,
~bold: bool=?,
~dim: bool=?,
~italic: bool=?,
~underline: bool=?,
~inverse: bool=?,
~hidden: bool=?,
~strikethrough: bool=?,
~color: colorName=?,
~backgroundColor: colorName=?,
~children: list(string),
unit
) =>
string;