Skip to content

Build your personal knowledge base with Trilium Notes

refactor(bulk_action): full type safety for client

Elian Doran94dad49e2f54
diff --git a/packages/commons/src/lib/bulk_actions.ts b/packages/commons/src/lib/bulk_actions.ts
index 4dbce561e1..d80c189741 100644
--- a/packages/commons/src/lib/bulk_actions.ts
+++ b/packages/commons/src/lib/bulk_actions.ts
@@ -44,4 +44,6 @@ export type ActionHandlers = {
export type BulkActionData<T extends keyof ActionHandlers> = ActionHandlers[T] & { name: T };
-export type BulkAction = BulkActionData<keyof ActionHandlers>;
+export type BulkAction = {
+ [K in keyof ActionHandlers]: { name: K; } & ActionHandlers[K];
+}[keyof ActionHandlers];