mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: dialog
This commit is contained in:
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() {
|
||||
|
||||
Reference in new issue
Block a user