mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
refactor(bulk_action): full type safety for client
This commit is contained in:
parent
409638151c
commit
94dad49e2f
@ -44,4 +44,6 @@ export type ActionHandlers = {
|
|||||||
|
|
||||||
export type BulkActionData<T extends keyof ActionHandlers> = ActionHandlers[T] & { name: T };
|
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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user