From cd85cc32e2ba69d9544c25c3db57d8dbdd667a4a Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 5 Feb 2024 10:57:45 +0500 Subject: [PATCH] core: fix type error --- packages/core/src/api/sync/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/core/src/api/sync/index.ts b/packages/core/src/api/sync/index.ts index 82460109e..66eaee782 100644 --- a/packages/core/src/api/sync/index.ts +++ b/packages/core/src/api/sync/index.ts @@ -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, + localItems[item.id] as MaybeDeletedItem + ) ) ) : deserialized.map((item) =>