mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
chore(client/ts): port services/script_context
This commit is contained in:
@@ -138,8 +138,8 @@ function formatSize(size: number) {
|
||||
}
|
||||
}
|
||||
|
||||
function toObject<T>(array: T[], fn: (arg0: T) => [key: string, value: T]) {
|
||||
const obj: Record<string, T> = {};
|
||||
function toObject<T, R>(array: T[], fn: (arg0: T) => [key: string, value: R]) {
|
||||
const obj: Record<string, R> = {};
|
||||
|
||||
for (const item of array) {
|
||||
const [key, value] = fn(item);
|
||||
|
||||
Reference in New Issue
Block a user