Skip to content

Commit 0ff8075

Browse files
committed
Update Onyx functions to use OnyxSetCollectionInput type for set operations
1 parent 541d23e commit 0ff8075

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Onyx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ function update(data: OnyxUpdate[]): Promise<void> {
557557
collectionKeys.forEach((collectionKey) => enqueueMergeOperation(collectionKey, mergedCollection[collectionKey]));
558558
}
559559
},
560-
[OnyxUtils.METHOD.SET_COLLECTION]: (k, v) => promises.push(() => setCollection(k, v as OnyxMergeCollectionInput<OnyxKey>)),
560+
[OnyxUtils.METHOD.SET_COLLECTION]: (k, v) => promises.push(() => setCollection(k, v as OnyxSetCollectionInput<OnyxKey>)),
561561
[OnyxUtils.METHOD.MULTI_SET]: (k, v) => Object.entries(v as Partial<OnyxInputKeyValueMapping>).forEach(([entryKey, entryValue]) => enqueueSetOperation(entryKey, entryValue)),
562562
[OnyxUtils.METHOD.CLEAR]: () => {
563563
clearPromise = clear();
@@ -617,7 +617,7 @@ function update(data: OnyxUpdate[]): Promise<void> {
617617
);
618618
}
619619
if (!utils.isEmptyObject(batchedCollectionUpdates.set)) {
620-
promises.push(() => OnyxUtils.partialSetCollection(collectionKey, batchedCollectionUpdates.set as OnyxMergeCollectionInput<OnyxKey>));
620+
promises.push(() => OnyxUtils.partialSetCollection(collectionKey, batchedCollectionUpdates.set as OnyxSetCollectionInput<OnyxKey>));
621621
}
622622
});
623623

0 commit comments

Comments
 (0)