Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
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.tsindex 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];