I was having a look at the Wix Data Helpers.
When I try “get-and-update” the sample code shows an error straight away.
getAndUpdate(‘myCollection’, ‘000-000-001’, (item) => {
item.title = ‘new value’;
return item;
});
title shows a wiggly underline and a msg Property ‘title’ does not exist on type ‘object’.
I’ve tried it in actual code with valid collection id and fields that exist in the collection but that doesn’t seem to be the problem
Can anyone suggest how to get rid of the error?
Thanks
Kim