Refactor, cleanup
This commit is contained in:
@@ -9,6 +9,9 @@ export class CommandHook extends EventEmitter<CommandHookEvents>
|
||||
implements Hook<CommandHookT> {
|
||||
editorCommands = new Map<string, AppCommand>();
|
||||
system!: System<CommandHookT>;
|
||||
throttledBuildAllCommands = throttle(() => {
|
||||
this.buildAllCommands();
|
||||
}, 200);
|
||||
|
||||
constructor(
|
||||
private readOnly: boolean,
|
||||
@@ -17,10 +20,6 @@ export class CommandHook extends EventEmitter<CommandHookEvents>
|
||||
super();
|
||||
}
|
||||
|
||||
throttledBuildAllCommands = throttle(() => {
|
||||
this.buildAllCommands();
|
||||
}, 200);
|
||||
|
||||
buildAllCommands() {
|
||||
this.editorCommands.clear();
|
||||
for (const plug of this.system.loadedPlugs.values()) {
|
||||
|
||||
Reference in New Issue
Block a user