-
Notifications
You must be signed in to change notification settings - Fork 2
/
cli.ts
22 lines (19 loc) · 802 Bytes
/
cli.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Input from './index.ts';
const input = new Input();
while (!input.done) {
await input.wait();
const result1 = await input.question("Say something: ", false);
console.log('You said', result1);
const result2 = await input.question("Say something with newline:");
console.log('You said', result2);
const result3 = await input.question("Say something secret:", false, true);
console.log('You said', result3);
const result3b = await input.repeat();
console.log('You said again', result3b);
const result4 = await input.choose(["Option A", "Option B"], false);
console.log('You chose', result4);
const result5 = await input.choose(["Option A Private", "Option B Private"], false, true);
console.log('You chose', result5);
await input.choose(["Continue", "Quit"], true);
}
Deno.exit();