core: fix type error

This commit is contained in:
Abdullah Atta
2024-02-05 10:57:45 +05:00
committed by Abdullah Atta
parent 1d7d5fd565
commit cd85cc32e2

View File

@@ -37,7 +37,13 @@ import { Mutex } from "async-mutex";
import Database from "..";
import { migrateItem, migrateVaultKey } from "../../migrations";
import { SerializedKey } from "@notesnook/crypto";
import { Item, MaybeDeletedItem, Note, Notebook } from "../../types";
import {
Attachment,
Item,
MaybeDeletedItem,
Note,
Notebook
} from "../../types";
import { SYNC_COLLECTIONS_MAP, SyncTransferItem } from "./types";
import { DownloadableFile } from "../../database/fs";
import { SyncDevices } from "./devices";
@@ -303,7 +309,10 @@ class Sync {
itemType === "attachment"
? await Promise.all(
deserialized.map((item) =>
this.merger.mergeAttachment(item, localItems[item.id])
this.merger.mergeAttachment(
item as MaybeDeletedItem<Attachment>,
localItems[item.id] as MaybeDeletedItem<Attachment>
)
)
)
: deserialized.map((item) =>