refactor(bulk_action): add basic type safety for client

This commit is contained in:
Elian Doran
2025-07-19 12:54:16 +03:00
parent 0d3de92890
commit 409638151c
4 changed files with 51 additions and 49 deletions

View File

@@ -16,6 +16,7 @@ import RenameNoteBulkAction from "../widgets/bulk_actions/note/rename_note.js";
import { t } from "./i18n.js";
import type FNote from "../entities/fnote.js";
import toast from "./toast.js";
import { BulkAction } from "@triliumnext/commons";
const ACTION_GROUPS = [
{
@@ -90,7 +91,7 @@ function parseActions(note: FNote) {
.filter((action) => !!action);
}
export async function executeBulkActions(parentNoteId: string, actions: {}[]) {
export async function executeBulkActions(parentNoteId: string, actions: BulkAction[]) {
await server.post("bulk-action/execute", {
noteIds: [ parentNoteId ],
includeDescendants: true,