type cast

This commit is contained in:
Mads Rasmussen
2024-01-08 20:57:49 +01:00
parent 944627dee7
commit edfb086ba4
2 changed files with 12 additions and 12 deletions

View File

@@ -32,15 +32,15 @@ export class UmbScriptTreeStore extends UmbUniqueTreeStore {
#listen() {
// TODO: add event class to remove the magic strings
this.#actionEventContext?.addEventListener('detail-create-success', this.#onCreated);
this.#actionEventContext?.addEventListener('detail-save-success', this.#onSaved);
this.#actionEventContext?.addEventListener('detail-delete-success', this.#onDeleted);
this.#actionEventContext?.addEventListener('detail-create-success', this.#onCreated as EventListener);
this.#actionEventContext?.addEventListener('detail-save-success', this.#onSaved as EventListener);
this.#actionEventContext?.addEventListener('detail-delete-success', this.#onDeleted as EventListener);
}
#stopListening() {
this.#actionEventContext?.removeEventListener('detail-create-success', this.#onCreated);
this.#actionEventContext?.removeEventListener('detail-save-success', this.#onSaved);
this.#actionEventContext?.removeEventListener('detail-delete-success', this.#onDeleted);
this.#actionEventContext?.removeEventListener('detail-create-success', this.#onCreated as EventListener);
this.#actionEventContext?.removeEventListener('detail-save-success', this.#onSaved as EventListener);
this.#actionEventContext?.removeEventListener('detail-delete-success', this.#onDeleted as EventListener);
}
#onCreated = (event: UmbActionEvent) => {

View File

@@ -32,15 +32,15 @@ export class UmbStylesheetTreeStore extends UmbUniqueTreeStore {
#listen() {
// TODO: add event class to remove the magic strings
this.#actionEventContext?.addEventListener('detail-create-success', this.#onCreated);
this.#actionEventContext?.addEventListener('detail-save-success', this.#onSaved);
this.#actionEventContext?.addEventListener('detail-delete-success', this.#onDeleted);
this.#actionEventContext?.addEventListener('detail-create-success', this.#onCreated as EventListener);
this.#actionEventContext?.addEventListener('detail-save-success', this.#onSaved as EventListener);
this.#actionEventContext?.addEventListener('detail-delete-success', this.#onDeleted as EventListener);
}
#stopListening() {
this.#actionEventContext?.removeEventListener('detail-create-success', this.#onCreated);
this.#actionEventContext?.removeEventListener('detail-save-success', this.#onSaved);
this.#actionEventContext?.removeEventListener('detail-delete-success', this.#onDeleted);
this.#actionEventContext?.removeEventListener('detail-create-success', this.#onCreated as EventListener);
this.#actionEventContext?.removeEventListener('detail-save-success', this.#onSaved as EventListener);
this.#actionEventContext?.removeEventListener('detail-delete-success', this.#onDeleted as EventListener);
}
#onCreated = (event: UmbActionEvent) => {