(core) Migrating commands to typescript

Summary: Migrating commands and commandList to typescript

Test Plan: Existing

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3871
This commit is contained in:
Jarosław Sadziński
2023-04-21 13:31:10 +02:00
parent b13fb1d97e
commit b4c4a62a73
6 changed files with 481 additions and 371 deletions

View File

@@ -97,16 +97,16 @@ export class App extends DisposableWithEvents {
dom('th', t("Description"))
)
),
dom.forEach(commandList.groups, (group: any) => {
const cmds = group.commands.filter((cmd: any) => Boolean(cmd.desc && cmd.keys.length && !cmd.deprecated));
dom.forEach(commandList.groups, (group) => {
const cmds = group.commands.filter((cmd) => Boolean(cmd.desc && cmd.keys.length && !cmd.deprecated));
return cmds.length > 0 ?
dom('tbody',
dom('tr',
dom('td', {colspan: 2}, group.group)
dom('td', {colspan: '2'}, group.group)
),
dom.forEach(cmds, (cmd: any) =>
dom.forEach(cmds, (cmd) =>
dom('tr',
dom('td', commands.allCommands[cmd.name].getKeysDom()),
dom('td', commands.allCommands[cmd.name]!.getKeysDom()),
dom('td', cmd.desc)
)
)