mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
refactor(client/ts): use filtered generics for context menu commands
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CommandNames } from "../../components/app_context.js";
|
||||
import { MenuCommandItem } from "../../menus/context_menu.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
import noteTypesService from "../../services/note_types.js";
|
||||
@@ -128,7 +129,7 @@ export default class NoteTypeChooserDialog extends BasicWidget {
|
||||
if (noteType.title === '----') {
|
||||
this.$noteTypeDropdown.append($('<h6 class="dropdown-header">').append(t("note_type_chooser.templates")));
|
||||
} else {
|
||||
const commandItem = (noteType as MenuCommandItem)
|
||||
const commandItem = (noteType as MenuCommandItem<CommandNames>)
|
||||
this.$noteTypeDropdown.append(
|
||||
$('<a class="dropdown-item" tabindex="0">')
|
||||
.attr("data-note-type", commandItem.type || "")
|
||||
|
||||
Reference in New Issue
Block a user