I have the following invocation.
static findOneAndUpdate(
filter: FilterQuery<ISyncedOrder>,
update: UpdateQuery<ISyncedOrder>
): Promise<ISyncedOrder> {
return SyncedOrders.findOneAndUpdate(
filter,
update,
{upsert: true}
);
}
According to documents, I should be getting a document. But, IDE shows an error of a type mismatch (screenshot below).
When I checked the node module, I see the following signature for the method findOneAndUpdate.
What am I missing? Looks like I am headed in a wrong direction.

