mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 17:27:01 +08:00
refactor(bulk_action): full type safety for client
This commit is contained in:
parent
409638151c
commit
94dad49e2f
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue