Skip to content

Commit 4ba5245

Browse files
committed
chore(example): update aliases API
1 parent ffea220 commit 4ba5245

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

examples/basic/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ async function main() {
77

88
await setTimeout(1000);
99

10-
p.setGlobalAliases([
11-
['w', 'up'],
12-
['s', 'down'],
13-
['a', 'left'],
14-
['d', 'right'],
15-
['escape', 'cancel'],
16-
]);
10+
p.updateSettings({
11+
aliases: {
12+
w: 'up',
13+
s: 'down',
14+
a: 'left',
15+
d: 'right'
16+
}
17+
});
1718

1819
p.intro(`${color.bgCyan(color.black(' create-app '))}`);
1920

0 commit comments

Comments
 (0)