-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
83 lines (76 loc) · 1.4 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
75
76
77
78
79
80
81
82
83
declare const enum Color {
BLACK,
_1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
_11,
_12,
_13,
_14,
_15,
_16,
WHITE,
}
/** Clear the screen. */
declare function clearScreen(): void
/**
* Draw the specified text. The color parameter is a
* number between 0 (darkest) and 17 (lightest).
**/
declare function drawText(
text: string,
color: Color,
x: number,
y: number
): void
/**
* Draw the specified text, wrapping it so that it is no
* more than width characters wide.
**/
declare function drawTextWrapped(
text: string,
color: Color,
x: number,
y: number,
width: number
): void
/**
* Draw a box using the built-in box drawing characters.
**/
declare function drawBox(
color: Color,
x: number,
y: number,
width: number,
height: number
): void
/**
* Fill an area using the specified symbol.
**/
declare function fillArea(
symbol: string,
color: Color,
x: number,
y: number,
width: number,
height: number
): void
/**
* Write this server's persisted data string. You can
* convert a JavaScript object to a JSON string using
* `JSON.stringify()`.
**/
declare function saveData(data: string): void
/**
* Read this server's persisted data string. You can
* convert a JSON string to a JavaScript object using
* `JSON.parse()`.
**/
declare function loadData(): string