feat: dialog

This commit is contained in:
TrèsAbhi committed 2025-05-30 20:30:16 -05:00
1 parent 3aafe4d9f1
commit 8373fb1b7a
5 files changed
+53 -22

No files matched your search

@@ -43,12 +43,16 @@ export class CatalogItemAccessor {
return this;
}
get<Type>(Message: MessageFns<Type>, component: string) {
getOptional<Type>(Message: MessageFns<Type>, component: string) {
if (component in this.components) {
return Message.decode(this.components[component].value);
}
}
throw new Error(`Unknown component: ${component}`);
get<Type>(Message: MessageFns<Type>, component: string) {
const value = this.getOptional(Message, component);
if (value === undefined) throw new Error(`Unknown component: ${component}`);
return value;
}
pack() {