Wix Data Helpers, get-and-update sample code shows an error

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

image

Can anyone suggest how to get rid of the error?

Thanks
Kim

It shouldn’t block your code. You should be able to run your code but if you don’t want to see this error you can add this comment above the line:

//@ts-ignore

In this way you’ll ignore TypeScript and it will not check your code, so no errors will shown for next line.

Perfect, thank you

Kim