fix(client): type errors due to command change

This commit is contained in:
Elian Doran
2025-02-24 12:39:40 +02:00
parent 147c340529
commit 2ab22e7b0e
7 changed files with 29 additions and 18 deletions

View File

@@ -80,8 +80,7 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
return promises.length > 0 ? Promise.all(promises) : null;
}
triggerCommand<K extends CommandNames>(name: K, _data?: CommandMappings[K]): Promise<unknown> | undefined | null {
const data = _data || {};
triggerCommand<K extends CommandNames>(name: K, data?: CommandMappings[K]): Promise<unknown> | undefined | null {
const fun = (this as any)[`${name}Command`];
if (fun) {